Skip to content

Ariefah Shalihah

  • Home
  • About

How to sort a list of lists by an index of each inner list in Python

Use sorted() with operator.itemgetter()

use sorted() with a lambda expression



how-to-sort-a-list-of-lists-by-an-index-of-each-inner-list-in-python

Categories PYTHON
Post navigation
How to sort a dictionary by keys in Python
How to sort a list of tuples by the second value in Python

Recent Posts

  • How asynchronously call methods in Python
  • How get a function name as a string in Python
  • How pretty print a JSON file in Python
ariefahshalihah