RE: Learn Python Series (#6) - Handling Lists Part 2

You are viewing a single comment's thread from:

Learn Python Series (#6) - Handling Lists Part 2

in utopian-io •  7 years ago 

Thank you for the contribution. It has been approved.

Great tutorial once again, but I was wondering what the difference between list.sort() and sorted() is (when would you use one over the other)?

You can contact us on Discord.
[utopian-moderator]

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

list.sort() modifies the existing list, while sorted() returns a new list without modifying the given list.