In Perl, if I want to assign $myVar a value of $var1, $var2, or $var3, based on which one evaluates to true, I would code the following:
$myVar = $var1 || $var2 || $var3;
I am working on separate projects in both Python and PHP, and I have not figured out how to code this situation as concisely in either language.
What is the best way to code this in Python?
What is the best way to code this in PHP?