input: Write a function to generate a dictionary where the keys are the elements of the list and the values are the squares of the keys.
  assert generate_dict([1, 2, 3]) == {1: 1, 2: 4, 3: 9}
  assert generate_dict([4, 5, 6]) == {4: 16, 5: 25, 6: 36}
  assert generate_dict([7, 8, 9]) == {7: 49, 8: 64, 9: 81}
output: def generate_dict(lst):
      return {x: x**2 for x in lst}