DEV Community

Ganesh Chandrasekaran
Ganesh Chandrasekaran

Posted on


How to sort tuples in Python ?

Tuples are immutable, but there is a simple way to sort them.

Convert the Tuple to List by using sorted function
then cast the List to Tuple.

Alt Text

Source : with lambda examples

Oldest comments (0)

An Animated Guide to Node.js Event Loop

>> Check out this classic DEV post <<