list comprehensions *are* nice
n8gray at caltech.edu.is.my.e-mail.address
Tue May 15 00:50:50 EDT 2001
Andrew Dalke wrote in message <9doc1h$3sp$1 at slb3.atl.mindspring.net>...
>A couple months ago I complained that list comprehensions were
>too confusing and that I would still be using
> results = 
> for val in data:
>I was wrong.
if len(lst) <= 1: return lst
return qsort([lessthan for lessthan in lst[1:] if lessthan < lst]) +
[lst] + qsort([grtreq for grtreq in lst[1:] if grtreq >=
Take that, Haskell! List comprehensions are rad.
More information about the Python-list