title: Why does equality not appear to be a symmetric relation in Python?
body: <p>I'm learning about comparison operators, and I was playing around with True and False statements. I ran the following code in the Python shell:</p>
  <pre><code>not(5&gt;7) == True
  </code></pre>
  <p>As expected, this returned <code>True</code>. However, I then ran the following code:</p>
  <pre><code>True == not(5&gt;7)
  </code></pre>
  <p>and there was a syntax error. Why was this? If the first line of code is valid syntax, then surely the second line of code should also be valid. Where have I gone wrong?</p>
  <p>(To give a bit of background, my understanding is that <code>=</code> in Python is only used for variable assignment, while <code>==</code> is closely related to the mathematical symbol '='.)</p>