operator.itemgetter (1) dalam python

sorted(movies, key=itemgetter('date'))#equivalent to "sorted(movies, key = lambda x: x['date'])"Output: [{'name': 'Avengers: Age of Ultron', 'date': '24/4/2013'}, {'name': 'Iron Man 3', 'date': '26/4/2013'}, {'name': 'Avengers Endgame', 'date': '26/4/2019'}]
Cute Capuchin