input: Write a function to find and 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([1, 2, 3, 4, 5])==5
  assert max_num([10, 20, 30, 40, 50])==50
  assert max_num([9, 8, 7, 6, 5])==9
  assert max_num([0, 0, 0, 0, 0])==0
output: def max_num(nums):
      max = nums[0]
      for num in nums[1:]:
          if num > max:
              max = num
      return max