input: Write a python function to create a dictionary from a list where keys are list elements and values are their respective indices.
  assert create_dict(["a", "b", "c"]) == {"a": 0, "b": 1, "c": 2}
  assert create_dict(["apple", "banana", "cherry"]) == {"apple": 0, "banana": 1, "cherry": 2}
  assert create_dict(["x", "y", "z", "w"]) == {"x": 0, "y": 1, "z": 2, "w": 3}
output: def create_dict(lst):
      return {element: index for index, element in enumerate(lst)}