title: Understanding the python print output with two variables
body: <pre><code>&gt;&gt;&gt; a=10
  &gt;&gt;&gt; print(str(a)[a==10])
  0
  &gt;&gt;&gt; print(str(a)[a=='10'])
  1
  &gt;&gt;&gt; print(str(a)[a=='11'])
  1
  </code></pre>
  <p>How is the above result of 0 and 1 obtained?</p>