title: python compound and or if condition
body: <pre><code>if tarX == 'ini' or 'txt' and act == 'm':
  </code></pre>
  
  <p>In normal English the if statement needs to verify 2 conditions are true:</p>
  
  <ol>
  <li>that tarX (a variable) is either ini or txt </li>
  <li>that act (a variable) is equal to m </li>
  </ol>
  
  <p>I tried several variations to no avail. I'm sure it's my syntax/logic error not python inability.
  The statement below works because (assumption) the condition to the left of the and statement compares a variable (tarX) for equality of a single string (exe) and the same holds true for the condition on the right variable (act) compared to (m). I'm assuming I'm not correctly "packaging" the if tarX == 'ini' or 'txt' and act == 'm': statement. </p>
  
  <p>if tarX == 'exe' and act == 'm':</p>