title: what is the difference between [("a" and "b") not in a] and [(("a" not in a) and ("b" not in a))]?
body: <p>Assume dict
  <code>dic={&quot;a&quot;:1}</code></p>
  <p><code>(&quot;a&quot; and &quot;b&quot;) not in dic</code> = True</p>
  <p>while</p>
  <p><code>((&quot;a&quot; not in dic) and (&quot;b&quot;  not in dic))</code> =False</p>
  <p>My guess is something with <code>not</code> as after I removed it both equation have the same behavior, but even after reading some docs I cannot see why. What I want to achieve is the second behavior, what is the proper way to do it without using 2 <code>in</code>?</p>