input: Write a python function to convert a list to a dictionary where the list elements become the keys and their indices become the values.
  assert list_to_dict(['a', 'b', 'c']) == {'a': 0, 'b': 1, 'c': 2}
  assert list_to_dict([10, 20, 30]) == {10: 0, 20: 1, 30: 2}
  assert list_to_dict([5, 10, 15, 20]) == {5: 0, 10: 1, 15: 2, 20: 3}
output: def list_to_dict(lst):
      return {element: index for index, element in enumerate(lst)}