input: Write a function to find the maximum number from a list of non-negative integers. The function should return the maximum number found in the list. If the list is empty, the function should return 0.
  def find_max(list):
      if not list:
          return 0
      max_num = list[0]
      for num in list:
          if num > max_num:
              max_num = num
      return max_num
  
  assert find_max([1, 3, 12, 5, 8, 10])==12
  assert find_max([0])==0
  assert find_max([])==0
  assert find_max([9, 9, 9, 9])==9
  assert find_max([100, 200, 300, 400])==400
output: def find_max(list):
      if not list:
          return 0
      max_num = list[0]
      for num in list:
          if num > max_num:
              max_num = num
      return max_num