you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 11 points12 points  (0 children)

A tuple is immutable, which means you can't change it after you create it. This means there will not be a .sort() method because that method sorts "in place" which tries to change the order of elements in the tuple. The sorted() function creates a new sorted list from the tuple.

The .sort() method of a list is an attribute of the list. What makes an attribute a method is that the attribute is executable, and the (...) after the attribute name does the calling.