input: Write a function to calculate the average age from a list of dictionaries.
  assert average_age([{"name": "Smith", "age": 30}, {"name": "John", "age": 40}, {"name": "Lee", "age": 50}]) == 40.0
  assert average_age([{"name": "Alice", "age": 25}, {"name": "Bob", "age": 35}, {"name": "Charlie", "age": 45}]) == 35.0
  assert average_age([{"name": "Tom", "age": 20}, {"name": "Jerry", "age": 30}, {"name": "Spike", "age": 40}]) == 30.0
output: def average_age(people):
      total_age = sum(person['age'] for person in people)
      average = total_age / len(people)
      return average