input: Write a function to fix the bugs in the given Python code that sums up all elements in a list. Ensure that the function correctly returns the sum of the list and avoid variable name conflicts.
  
  def sum_list(list):
      total = 0
      for num in list:
          total += num
      return total
  
  assert sum_list([1, 2, 3, 4])==10
  assert sum_list([10, 20, 30])==60
  assert sum_list([])==0
  assert sum_list([-1, -2, -3, -4])==-10
  assert sum_list([0, 0, 0])==0
output: def sum_list(input_list):
      total = 0
      for num in input_list:
          total += num
      return total