On Wed, Oct 24, 2012 at 1:30 PM, Joel Goldstick <joel.goldst...@gmail.com> wrote: > >>> if (i[1] == '25' or i[1] == '26'): > > like this > if i[1] in ('25', '26'):
Using "in ['25', '26']" also checks a compiled tuple constant: >>> compile("x in ['25', '26']", '', 'eval').co_consts ('25', '26', ('25', '26')) 3.x adds frozenset support: >>> compile("x in {'25', '26'}", '', 'eval').co_consts ('25', '26', frozenset({'25', '26'})) _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor