The in opperator -- How do I use it?

Brad Bollenbach bbollenbach at
Wed Mar 7 07:50:49 CET 2001

Think of the "in" operator as the list membership operator...because that's
what it is. :)

So if you want to know "if 3 is in [4, 5, 6]", then:

if 3 in [4, 5, 6]:
    print "it is."
    print "it isn't."

it isn't.

In other words
"Mark" <mmoon at> wrote in message
news:983945437.96921 at
> How do I use the 'in' operator?
> Currently I have having some difficulty in getting it to work
> Mark
> mmoon at

More information about the Python-list mailing list