Python keywords

Hamilton, William whamil1 at entergy.com
Thu Apr 26 14:59:47 EDT 2007


> -----Original Message-----
> From: python-list-bounces+whamil1=entergy.com at python.org
[mailto:python-
> list-bounces+whamil1=entergy.com at python.org] On Behalf Of gtb
> Sent: Thursday, April 26, 2007 1:50 PM
> To: python-list at python.org
> Subject: Re: Python keywords
> 
> On Apr 26, 10:16 am, Larry Bates <larry.ba... at websafe.com> wrote:
> > http://docs.python.org/ref/keywords.html
> >
> > in keyword is a general one and can be used for many objects.
> >
> > x in 'xyz'
> >
> > y in ['a','b','c','y','z'']
> >
> > z in ('a','b','c','y','z']
> >
> > key in {'key1':1, 'key2': 2}
> >
> > The in you see with a for isn't associated with the for loop
> > but rather the sequence you are iterating over
> >
> > for i in range(10):
> >
> > -Larry
> 
> Thanks Larry. I saw that page you referenced above and that is how I
> knew it was a keyword. But I still have found nodocumentation that
> supports the examples you provided.

http://docs.python.org/ref/comparisons.html#l2h-438

This information is 2 clicks away from any page in the reference:  click
the index link, then scroll down to the link to "in operator".


---
-Bill Hamilton



More information about the Python-list mailing list