Efficient Rank Ordering of Nested Lists

Cousin Stanley cousinstanley at gmail.com
Sat Aug 4 22:53:05 EDT 2007


> Cousin Stanley <cousinstanley at gmail.com> wrote:
>    ...
>>       for i , item in reversed( enumerate( sorted( single_list ) ) ) :
>    ...
>> TypeError: argument to reversed() must be a sequence
>
> Oops, right.  Well then,
>
>     aux_seq = list(enumerate(sorted(single_list)))
>     for i, item in reversed(aux_seq): ...

Alex .... 

  That fixed it. 

  Thanks ....


-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----



More information about the Python-list mailing list