input: Write a function to identify and fix any bugs in the given Python code. The function should properly return the sum of a list of numbers. If the input list is empty, it should return 0.
  assert sum_list([1, 2, 3, 4])==10
  assert sum_list([-1, 0, 1])==0
  assert sum_list([10, -10])==0
  assert sum_list([])==0
output: def sum_list(numbers):
      if not numbers:
          return 0
      return sum(numbers)