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.org/mailman/listinfo/python-list

Reply via email to