input: Write a function to edit the given Python program to use a dictionary instead of a list. If the given list is empty then return an empty dictionary.
  assert edit_to_dict([1, 2, 3, 4])=={1: 'one', 2: 'two', 3: 'three', 4: 'four'}
  assert edit_to_dict([1, 2, 3])=={1: 'one', 2: 'two', 3: 'three'}
  assert edit_to_dict([])=={}
  assert edit_to_dict([4, 5, 6])=={4: 'four', 5: 'five', 6: 'six'}
  assert edit_to_dict([1, 2])=={1: 'one', 2: 'two'}
  assert edit_to_dict([3])=={3: 'three'}
output: def edit_to_dict(lst):
      if not lst:
          return {}
      num_to_word = {1: 'one', 2: 'two', 3: 'three', 4: 'four', 5: 'five', 6: 'six'}
      return {num: num_to_word[num] for num in lst if num in num_to_word}