Answers for "python sort array custom comparator"

0

python sort array custom comparator

l = [{'prop': 2}, {'prop': 3}, {'prop': 1}]

l.sort(key=lambda x: x['prop'])
Posted by: Guest on June-06-2021

Code answers related to "python sort array custom comparator"

Python Answers by Framework

Browse Popular Code Answers by Language