In Python, I believe you can say
myVar = var1 or var2 or var3
The Python documentation describes x or y as
if x is false, then y, else x
Edit: theatrus brings up an interesting point - I hadn't even considered that the variables might not be defined. I found this discussion on the matter:
Python doesn't have a specific
function to test whether a variable is
defined, since all variables are
expected to have been defined before
use - even if initially just assigned
the None object. Attempting to access
a variable that hasn't previously been
defined will raise an exception.
It is generally considered unusual in
Python not to know whether a variable
has already been defined. But if you
are nevertheless in this situation,
you can make sure that a given
variable is in fact defined (as None,
if nothing else) by attempting to
access it inside a 'try' block and
assigning it the None object should it
raise a NameError exception.
So, if you're not guaranteed that the variables exist, and you want to check one by one for both existence and truthiness, you could be in for some messy code.