input: Write a function to find the maximum number in a given list. If the list is empty return None.
  assert max_num([9, 2, 5, 6, 4, 1])==9
  assert max_num([12, 3, 7, 7, 10])==12
  assert max_num([-3, -7, -10, -1])==-1
  assert max_num([5])==5
  assert max_num([])==None
output: def max_num(lst):
      if not lst:
          return None
      return max(lst)