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