On Fri, Feb 20, 2015 at 4:51 PM, Jason Friedman <jsf80...@gmail.com> wrote: >> I'd still advise using my_list.sort() rather than sorted(), as you >> don't need to retain the original. >> > > Hmm. > > Trying to figure out what that looks like. > If I understand correctly, list.sort() returns None. > What would I return to the caller?
Check its docs: it sorts the list in place. So you return the list, after you sort it. It's like appending to a list: None is returned and the list itself is changed. ChrisA -- https://mail.python.org/mailman/listinfo/python-list