Answers for "python sort a list of dictionaries by ascending or descending"

0

how to sort a list of dictionary by value in descending order?

1. new_list = sorted(old_list, key=lambda k: k['key'], reverse=True)
/*use reverse=False for ascending order*/
Posted by: Guest on June-22-2020

Code answers related to "python sort a list of dictionaries by ascending or descending"

Python Answers by Framework

Browse Popular Code Answers by Language