input: Write a function to calculate the average of a list of numbers in Python.
  def avg_list(lst):
      sum = 0
      count = 0
      for i in lst:
          sum += i
          count += 1
      avg = sum / count
      return avg
  
  assert avg_list([1, 2, 3, 4, 5]) == 3.0
  assert avg_list([10, 20, 30]) == 20.0
  assert avg_list([7, 8, 9, 10]) == 8.5
  assert avg_list([]) == None
  assert avg_list([0]) == 0.0
output: def avg_list(lst):
      if not lst:
          return None
      sum = 0
      count = 0
      for i in lst:
          sum += i
          count += 1
      avg = sum / count
      return avg