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