Python - how to check if one of several conditions is met and then specifically if each of conditions is met?
<p>I am wondering if there is any shortcut to do the following:</p>

<pre><code>if a or b or c ...
    do p
    if a
        do x
    if b
        do y
    if c
        do z
    ...
else
    do q
</code></pre>

<p>Is it necessary to type out each of the conditions twice or is there any other way to do this?</p>
