input: Write a python function to convert a list of strings into a dictionary counting the occurrences of each string.
  assert list_to_dict(['red', 'blue', 'red', 'green', 'blue', 'blue']) == {'red': 2, 'blue': 3, 'green': 1}
  assert list_to_dict(['apple', 'banana', 'apple', 'apple', 'banana', 'cherry']) == {'apple': 3, 'banana': 2, 'cherry': 1}
  assert list_to_dict(['cat', 'dog', 'cat', 'bird', 'dog', 'dog']) == {'cat': 2, 'dog': 3, 'bird': 1}
output: def list_to_dict(lst):
      result = {}
      for item in lst:
          if item in result:
              result[item] += 1
          else:
              result[item] = 1
      return result