Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (7 sloc) 296 Bytes
list.sort() modifies the list in-place (and returns None to avoid confusion).
Usually it's less convenient than sorted() - but if you don't need the original list,
it's slightly more efficient.
Alternatively:
print sorted(my_list)
http://docs.python.org/howto/sorting.html
http://goo.gl/3Z1Te