input: Write a function that takes a list containing fruit names and returns the most common fruit name. If the list is empty, the function should return None.
  def most_common_fruit(fruit_list):
      if not fruit_list:
          return None
   
      freq_dict = {}
   
      for fruit in fruit_list:
          freq_dict[fruit] = freq_dict.get(fruit, 0) + 1
   
      max_freq = max(freq_dict.values())
   
      most_common_fruit = next(fruit for fruit, freq in freq_dict.items() if freq == max_freq)
   
      return most_common_fruit
  
  assert most_common_fruit(['Apple', 'Orange', 'Apple', 'Pineapple', 'Grape', 'Apple'])=='Apple'
  assert most_common_fruit(['Orange', 'Orange', 'Apple', 'Pineapple', 'Grape'])=='Orange'
  assert most_common_fruit([])==None
  assert most_common_fruit(['Grape', 'Grape', 'Grape', 'Grape'])=='Grape'
output: def most_common_fruit(fruit_list):
      if not fruit_list:
          return None
   
      freq_dict = {}
   
      for fruit in fruit_list:
          freq_dict[fruit] = freq_dict.get(fruit, 0) + 1
   
      max_freq = max(freq_dict.values())
   
      most_common_fruit = next(fruit for fruit, freq in freq_dict.items() if freq == max_freq)
   
      return most_common_fruit