input: Write a function to find the maximum number from a given list.
  
  def max_num(nums):
      if not nums:
          return None
      max = nums[0]
      for num in nums[1:]:
          if num > max:
              max = num
      return max
  
  assert max_num([5, 4, 2, 7, 12]) == 12
  assert max_num([1, 2, 3, 4, 5]) == 5
  assert max_num([-1, -2, -3, -4, -5]) == -1
  assert max_num([]) == None
  assert max_num([100, 2, 99, 4, 5]) == 100
output: def max_num(nums):
      if not nums:
          return None
      max = nums[0]
      for num in nums[1:]:
          if num > max:
              max = num
      return max