To expand on Tino's response, sort() sorts in place and does not *return* a sorted copy of the list.
In other words: unsortedList = list(["XYZ","ABC"]) unsortedList.sort() print sortedList is correct. Since sort() returns None, you lose your list if you do: unsortedList = unsortedList.sort() Jonathon On Tue, Oct 28, 2008 at 8:59 AM, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > RC wrote: > >> unsortedList = list(["XYZ","ABC"]) >> >> sortedList = unsortedList.sort() >> print sortedList >> >> >> Why this return None? >> > > Because you did not read the documentation. > > Regards > Tino > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- Computers are like air conditioners... They quit working when you open Windows.
-- http://mail.python.org/mailman/listinfo/python-list