input: Write a function to calculate the sum of the items in a given list. If the list is empty, return 0.
  def sum_list(input_list):
    sum = 0
    for i in input_list:
      sum += i
    return sum
  
  assert sum_list([1, 2, 3]) == 6
  assert sum_list([4, 5, 6, 7]) == 22
  assert sum_list([10]) == 10
  assert sum_list([]) == 0
output: def sum_list(input_list):
    sum = 0
    for i in input_list:
      sum += i
    return sum