input: Write a function that takes a list of integers and returns the sum of all elements in the list. If the input list is empty, the function should return 0.
  def sum_list(lst):
    total = 0
    for num in lst:
      total += num
    return total
  
  assert sum_list([1, 2, 3, 4, 5])==15
  assert sum_list([-1, -2, -3, -4, -5])==-15
  assert sum_list([0, 0, 0, 0, 0])==0
  assert sum_list([10])==10
  assert sum_list([])==0
output: def sum_list(lst):
    total = 0
    for num in lst:
      total += num
    return total