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