The in opperator -- How do I use it?
Brad Bollenbach
bbollenbach at homenospam.com
Wed Mar 7 01:50:49 EST 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."
else:
print "it isn't."
it isn't.
In other words
"Mark" <mmoon at apexmail.com> wrote in message
news:983945437.96921 at atlas.uniserve.ca...
> How do I use the 'in' operator?
> Currently I have having some difficulty in getting it to work
> Mark
> mmoon at apexmail.com
>
>
More information about the Python-list
mailing list