delay and force in Python

infidel saint_infidel at hotmail.com
Wed Jan 19 20:54:18 CET 2005


It took me a while to figure out what the "translated" code was trying
to do.  Here's a quick example that I think accomplishes the same
thing:

>>> for i, n in enumerate(x for x in xrange(998) if x % 2 == 0):
... 	if i == 1:
... 		print n
... 		
2




More information about the Python-list mailing list