title: How to get the index of an integer from a list if the list contains a boolean?
body: <p>I am just starting with Python.</p>
  
  <p>How to get index of integer <code>1</code> from a list if the list contains a boolean <code>True</code> object before the <code>1</code>?</p>
  
  <pre><code>&gt;&gt;&gt; lst = [True, False, 1, 3]
  &gt;&gt;&gt; lst.index(1)
  0
  &gt;&gt;&gt; lst.index(True)
  0
  &gt;&gt;&gt; lst.index(0)
  1
  </code></pre>
  
  <p>I think Python considers <code>0</code> as <code>False</code> and <code>1</code> as <code>True</code> in the argument of the <code>index</code> method. How can I get the index of integer <code>1</code> (i.e. <code>2</code>)?</p>
  
  <p>Also what is the reasoning or logic behind treating boolean object this way in list?
  As from the solutions, I can see it is not so straightforward.</p>