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