conditional for-statement

seb sdementen at gmail.com
Sun Aug 23 10:09:04 CEST 2009


Hi,

i was wondering if there is a syntax alike:

for i in range(10) if i > 5:
    print i

equivalent to

for i in (for i in range(10) if i>5):
    print i

sebastien



More information about the Python-list mailing list