How to Sort a List of Tuples in Python: There’s More Than One Way

Claudio Sabato
7 min readOct 4, 2021

Do you have to sort a list of tuples in your Python program? Are you trying to figure out if you should use sorted() or sort()? You are in the right place.

The first way to sort a list of tuples is by using the Python sorted() function that returns a new sorted list of tuples. An alternative is the list sort() method that doesn’t return a new list but

--

--

Claudio Sabato

Claudio Sabato is an IT expert with over 15 years of professional experience in Python/Bash programming, Linux Systems Administration and IT Systems Design.