input: Write a function to generate a frequency dictionary from a list.
  assert frequency_dict([1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == {1: 1, 2: 2, 3: 3, 4: 4}
  assert frequency_dict(['a', 'b', 'a', 'a', 'b', 'c']) == {'a': 3, 'b': 2, 'c': 1}
  assert frequency_dict([1, 1, 1, 1, 1]) == {1: 5}
output: def frequency_dict(lst):
      freq = {}
      for item in lst:
          if item in freq:
              freq[item] += 1
          else:
              freq[item] = 1
      return freq