I'm starting to think like a Pythonista

brad byte8bits at gmail.com
Wed Oct 10 17:13:36 EDT 2007


Erik Jones wrote:

> big_evens = range(10, 100, 2)
> big_odds = range(11, 100, 2)

Neat, but not as clever or as hard to read as mine... I'll bet it faster 
though... maybe not.

The upto part is here:

ok_numbers = low_odds + big_evens + [x for x in low_evens if x <= y]




More information about the Python-list mailing list