list.sort() modifies the existing list, while sorted() returns a new list without modifying the given list.
You are viewing a single comment's thread from:
list.sort() modifies the existing list, while sorted() returns a new list without modifying the given list.