input: Write a function to print the maximum number from a given list.
  def max_num(nums):
      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([10, 20, 5, 35, 25])==35
  assert max_num([1, 3, 5, 7, 9])==9
  assert max_num([3, 2, 1])==3
  assert max_num([42])==42
output: def max_num(nums):
      max = nums[0]
      for num in nums[1:]:
          if num > max:
              max = num
      return max