input: Write a function to find and return the maximum number from a given list of integers. If the list is empty, return 0.
  def max_nums(nums):
      if not nums:
          return 0
      max = nums[0]
      for num in nums[1:]:
          if num > max:
              max = num
      return max
  
  assert max_nums([5, 4, 2, 7, 12])==12
  assert max_nums([-1, -2, -3])==-1
  assert max_nums([])==0
output: def max_nums(nums):
      if not nums:
          return 0
      max = nums[0]
      for num in nums[1:]:
          if num > max:
              max = num
      return max