(Hackerrank) HackerRank Python Certification Practice Test
Hackerrank - HackerRank Python Certification Hackerrank - HackerRank Python Built-in Functions and Lambdas Questions and Answers
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?
Select your answer
A
sorted(people, key=lambda person: person['age'])
B
people.sort(lambda person: person['age'])
C
sorted(people, 'age')
D
people.sort(key='age')
Hint