input: Write a function to determine the sum of all the items in a given list. Return the sum. If the list is empty, return 0.
  assert sum_list([1, 2, 3])==6
  assert sum_list([0, 0, 0])==0
  assert sum_list([-1, 1, 2])==2
  assert sum_list([5])==5
  assert sum_list([])==0
output: def sum_list(lst):
      return sum(lst) if lst else 0