gaurav kashyap wrote: > Hi all, > I am using python version 2.3.in a program , > I have called the sort function.Wherein, > a.sort(reverse=True) > is giving the following error: > > TypeError: sort() takes no keyword arguments. > > It works in python 2.4,What can be the alternative in python 2.3
a.reverse() a.sort() a.reverse() gives the same result. If you don't care about the order of equal items a.sort() a.reverse() will do. Peter -- http://mail.python.org/mailman/listinfo/python-list