input: 
  from typing import List
  
  def max_num(list: List[int]) -> int:
      """Find the maximum number in a given list of integers.
      >>> max_num([9, 2, 5, 6, 4, 1])
      9
      >>> max_num([-1, -5, -3, -2])
      -1
      >>> max_num([0, 10, 20, 30, -10])
      30
      """
  
output:     if not list:
          return None
      max_val = list[0]
      for num in list:
          if num > max_val:
              max_val = num
      return max_val