[Tutor] advanced sorting

chinni srikanth007m at gmail.com
Tue Sep 4 15:57:04 CEST 2007


In Advance Sorting by giving the keywords to sort the list.But, iam getting
the fallowing errors

>>> x = ['srikanth', 'kumar', 'muppandam', 'will', 'be', 'a']
>>> x.sort(key=len)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: sort() takes no keyword arguments
>>> x.sort(reverse=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: sort() takes no keyword arguments


-Best Regards,
M.srikanth.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070904/09c67891/attachment.htm 


More information about the Tutor mailing list