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