sorted or .sort() ?

Hrvoje Niksic hniksic at xemacs.org
Mon Jun 16 09:57:48 EDT 2008


Peter Bengtsson <peterbe at gmail.com> writes:

> Does that mean that .sort() is more efficient and should be favored
> when you can (i.e. when you don't mind changing the listish object)?

Yes.  Note that it's not "the listish object", the "sort" method is
implemented on actual lists, not on any sequence.



More information about the Python-list mailing list