Published
- 1 min read
sort list of dictionaries by key python
The solution for this is noted below
sort list of dictionaries by key python
Solution
newlist = sorted(list_to_be_sorted, key=lambda k: k['name'])
Try other methods by searching on the site. That is if this doesn’t work