input: Write a function to calculate the average of a list of numbers. If the list is empty, return 0.
  assert avg_list([1, 2, 3, 4, 5]) == 3
  assert avg_list([0, 0, 0, 0]) == 0
  assert avg_list([10, 20, 30, 40]) == 25
  assert avg_list([7]) == 7
  assert avg_list([]) == 0
output: def avg_list(lst):
      if not lst:
          return 0
      return sum(lst) / len(lst)