input: Write a python function to convert a list to a dictionary.
  assert list_to_dict([("apple", "fruit"), ("carrot", "vegetable")]) == {"apple": "fruit", "carrot": "vegetable"}
  assert list_to_dict([("a", 1), ("b", 2), ("c", 3)]) == {"a": 1, "b": 2, "c": 3}
  assert list_to_dict([]) == {}
output: def list_to_dict(lst):
      return dict(lst)