input: Write a function to randomly select one element from a given array. The function should return the selected element.
  
  assert randomElement([1, 2, 3, 4]) in [1, 2, 3, 4]
  assert randomElement([5, 6, 7, 8, 9]) in [5, 6, 7, 8, 9]
  assert randomElement([10]) == 10
  assert randomElement([]) is None
output: import random
  
  def randomElement(arr):
      if not arr:
          return None
      return random.choice(arr)