You are viewing a single comment's thread from:

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

in #utopian-io8 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]

Sort:  

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

Coin Marketplace

STEEM 0.06
TRX 0.32
JST 0.061
BTC 66568.36
ETH 2037.19
USDT 1.00
SBD 0.50