input: Write a function to randomly select and print an element from a given list of elements. The list is provided as input to the function. If the list is empty, print 'No items in the list'.
  
  def print_random_element(elements):
      if not elements:
          print('No items in the list')
      else:
          randomIndex = random.randint(0, len(elements)-1)
          randomElement = elements[randomIndex]
          print(randomElement)
  
  assert print_random_element(["apple", "banana", "mango", "pear", "grape"]) is None
  assert print_random_element([]) is None
output: import random
  
  def print_random_element(elements):
      if not elements:
          print('No items in the list')
      else:
          randomIndex = random.randint(0, len(elements)-1)
          randomElement = elements[randomIndex]
          print(randomElement)