shouldn't list comprehension be faster than for loops?

sturlamolden sturlamolden at yahoo.no
Fri Dec 18 13:49:52 EST 2009


On 17 Des, 18:42, "Alf P. Steinbach" <al... at start.no> wrote:

> Have you tried this with
>
>    dip1 = [dp - 0.01 if dp == 90 else dp for dp in dipList]

And for comparison with map:

map(lambda dp: dp - 0.01 if dp == 90 else dp, dipList)




More information about the Python-list mailing list