input: Write a function to return the sum of the elements in the given list. If the list is empty, the function should return 0. For the given implementation, the function should be able to correctly sum the list elements for any non-empty list.
  
  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([5, 10, 15, 20])==50
  assert sum_list([-1, 2, -3, 4])==2
  assert sum_list([])==0
output: def sum_list(lst):
    total = 0
    for num in lst:
      total += num
    return total