title: Syntax of one line IF condition in Python
body: <p>Can someone say why this doesn't work in Python? Is it simply invalid syntax or is there more to it?</p>
  
  <pre><code>arr[0] += 12 if am_or_pm == 'PM'
  </code></pre>
  
  <p>The error message:</p>
  
  <pre><code>  File "solution.py", line 13
      arr[0] += 12 if am_or_pm == 'PM'
                                 ^
  SyntaxError: invalid syntax 
  </code></pre>
  
  <p>This works:</p>
  
  <pre><code>if am_or_pm == 'PM': arr[0] += 12
  </code></pre>