Re: Most efficient way to evaluate the contents of a variable.

2007-07-12 Thread Carsten Haese
On Fri, 13 Jul 2007 06:37:19 +0200, Stargaming wrote > bdude schrieb: > > Hey, I'm new to python and am looking for the most efficient way to > > see if the contents of a variable is equal to one of many options. > > > > Cheers, > > Bryce R > > > > if var in ('-h', '--hello', '-w', '--world'): >

Re: Most efficient way to evaluate the contents of a variable.

2007-07-12 Thread Stargaming
bdude schrieb: > Hey, I'm new to python and am looking for the most efficient way to > see if the contents of a variable is equal to one of many options. > > Cheers, > Bryce R > if var in ('-h', '--hello', '-w', '--world'): pass Most maintenance-efficient, that is. -- http://mail.python.o

Most efficient way to evaluate the contents of a variable.

2007-07-12 Thread bdude
Hey, I'm new to python and am looking for the most efficient way to see if the contents of a variable is equal to one of many options. Cheers, Bryce R -- http://mail.python.org/mailman/listinfo/python-list