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