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([3, 8, 1, 9, 2])==9
  assert max_num([100])==100
  assert max_num([-5, -2, -8, -1])==-1
  assert max_num([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