input: Write a function to correct any bugs in the provided Python code. The function should sum up all the elements in a given list.
  
  def sum_list(list):
      sum_list = 0
      for num in list:
          sum_list += num
      return sum_list
  
  assert sum_list([1, 2, 3, 4, 5])==15
  assert sum_list([-1, -2, -3, -4, -5])==-15
  assert sum_list([])==0
  assert sum_list([10])==10
  assert sum_list([1, 2, 3, 0])==6
output: def sum_list(lst):
      total = 0
      for num in lst:
          total += num
      return total