PEP 276 Simple Iterator for ints

James_Althoff at James_Althoff at
Wed Nov 28 22:31:24 CET 2001

Lulu wrote:
>  >>> if i in 100:  print 'even Natural' # I have no idea what this MEANS!

Small point, but it would just mean the same as:

  >>> if i in xrange(100):

as in, e.g.,

>>> i = 2
>>> if i in xrange(100):
...     print 'spam'

You just wouldn't have to read or write the xrange thing. :-)


More information about the Python-list mailing list