sort list doesnt work, key=str still doesnt work

notnorwegian at yahoo.se notnorwegian at yahoo.se
Mon May 26 22:46:43 EDT 2008


>>> x
[',', ',', 'CHAPTER', 'Emma', 'I', 'I', 'VOLUME', 'Woodhouse',
'clever', 'handsome']
>>> x=sorted([',', ',', 'CHAPTER', 'Emma', 'I', 'I', 'VOLUME', 'Woodhouse', 'clever', 'handsome'], key=str)
>>> x
[',', ',', 'CHAPTER', 'Emma', 'I', 'I', 'VOLUME', 'Woodhouse',
'clever', 'handsome']
>>>

what do i need to do?



More information about the Python-list mailing list