input: Write a function to correct and fix a given function that finds the sum of a list of numbers. The function should correctly iterate over the list, accumulate the sum, and return the correct result.
  assert sum_list([1, 2, 3, 4])==10
  assert sum_list([-1, -2, -3, -4])==-10
  assert sum_list([0, 0, 0, 0])==0
  assert sum_list([0, 1, -1, 2, -2])==0
  assert sum_list([])==0
output: def sum_list(numbers):
      total = 0
      for num in numbers:
          total += num
      return total