Most efficient way to evaluate the contents of a variable.

Stargaming stargaming at
Fri Jul 13 06:37:19 CEST 2007

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'):

Most maintenance-efficient, that is.

More information about the Python-list mailing list