input: Write a function to find the maximum element in a given array of numbers. The function should return the maximum element. If the array is empty, the function should return None.
  assert find_max([1, 43, 78, 3, 92, 42])==92
  assert find_max([1])==1
  assert find_max([5, 8, 2, 10, 3])==10
  assert find_max([])==None
output: def find_max(arr):
      if not arr:
          return None
      return max(arr)