input: Write a function to return a random element from a given list of strings. The function should take in the list as input and return a single element randomly chosen from the list.
  import random
  def random_element_from_list(fruits):
      if len(fruits) == 0:
          return None
      randomIndex = random.randint(0, len(fruits)-1)
      return fruits[randomIndex]
  assert random_element_from_list(["apple", "banana", "mango", "pear", "grape"]) in ["apple", "banana", "mango", "pear", "grape"]
  assert random_element_from_list([]) == None
  assert random_element_from_list(["apple"]) == "apple"
  assert random_element_from_list(["banana", "mango"]) in ["banana", "mango"]
output: import random
  def random_element_from_list(fruits):
      if len(fruits) == 0:
          return None
      randomIndex = random.randint(0, len(fruits)-1)
      return fruits[randomIndex]