Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

How to Use sorted() and .sort() in Python: Summary

Pakorn on Dec. 31, 2019

Great tutorial, very useful, esp. the common issues section.

rich lysakowski on Jan. 1, 2020

Good review of sorted() and .sort(). Thank you!

Harsha Vardhan on Jan. 2, 2020

Now, I learned a better way to sort mixed numbers. Thank you Joe..

Venkat Ganti on Jan. 2, 2020

Thank you Joe, it is good tutorial. My take away is usage of lambda function and when to use sort and sorted.

Kevin Freeman on Jan. 3, 2020

Very clear explanations and realistic examples. Thanks Joe!

Sandhya on Jan. 4, 2020

Thank you. Joe.

rallegre on Jan. 6, 2020

Great job Joe! Tutorial’s like this is the reason why subscribed to Real Python

sion on Jan. 6, 2020

Useful stuff. I liked the way you presented it. Thank you Joe.

Billiam on Jan. 7, 2020

Very nicely presented. Easy to understand and follow. Thanks Joe.

RetiringInComo on Jan. 15, 2020

Totally agree, thought it was going to be boring but had several ah - ha moments. Thanks Joe!!

majid021 on Jan. 30, 2020

Thank you for explaining the difference between sort and sorted in detail with good examples. I was using both sort and sorted thinking that they don’t have much difference, but after watching i got really good idea when to use what.

Thanks Joe.

Valeriy Pomulev on July 2, 2020

Thanks a lot, Joe. Great training.

ingdanielguerrero on July 17, 2020

great tutorial, thank you.

davedanger on Oct. 18, 2020

I’m taking an MIT EDX course (6.002.X) but Real Python is my goto for detailed explanation when and where needed. This helped me “sort” out some of the nuances that they glossed over in the lecture material. Thanks! Your tutorial is very well presented, and the key = lambda x:… explanation was what I needed for a current problem set.

Become a Member to join the conversation.