title: Associativity of "in" in Python?
body: <p>I'm making a Python parser, and this is <em>really</em> confusing me:</p>
  <pre><code>&gt;&gt;&gt; 1 in [] in 'a'
  False
  
  &gt;&gt;&gt; (1 in []) in 'a'
  TypeError: 'in &lt;string&gt;' requires string as left operand, not bool
  
  &gt;&gt;&gt; 1 in ([] in 'a')
  TypeError: 'in &lt;string&gt;' requires string as left operand, not list
  </code></pre>
  <p>How exactly does <code>in</code> work in Python, with regards to associativity, etc.?</p>
  <p>Why do no two of these expressions behave the same way?</p>