input: Write a function called sum_list which takes a list of integers as input and returns the sum of all the items in the list. If the list is empty, the function should return 0.
  assert sum_list([1, 2, 3, 4, 5])==15
  assert sum_list([7, 3, 9, 1])==20
  assert sum_list([2, -5, 8, -2])==3
  assert sum_list([])==0
output: def sum_list(lst):
      return sum(lst) if lst else 0