A list of dictionaries needs to be sorted based on the 'age' of each person. Which of the following code snippets correctly performs this sort?
-
A
sorted(people, key=lambda person: person['age'])
-
B
people.sort(lambda person: person['age'])
-
C
sorted(people, 'age')
-
D
people.sort(key='age')