input: Write a function that takes a list as input and returns the sum of its elements. If the list is empty, the function should return 0.
  
  assert sum_list([1, 2, 3, 4])==10
  assert sum_list([-1, 0, 1])==0
  assert sum_list([5])==5
  assert sum_list([])==0
output: def sum_list(lst):
      if not lst:
          return 0
      return sum(lst)