title: Why does the if statement ignore the first if?
body: <pre><code>myList = [5, 8, 5]
  
  x = int(input(&quot;Enter a number: &quot;))
  
  if x in myList:
      if myList.index(x) == 0 and myList.index(x) == 2:
          print(x, &quot;is in 1st and 3rd place!&quot;) 
      elif myList.index(x) == 0:
          print(x, &quot;is in 1st place!&quot;) 
      elif myList.index(x) == 2:
          print(x, &quot;is in 3rd place!&quot;) 
  </code></pre>
  <p>Entering 5 in the input
  expecting output:</p>
  <p><code>&gt;&gt;&gt; 5 is in 1st and 3rd place!</code></p>
  <p>actual output:</p>
  <p><code>&gt;&gt;&gt; 5 is in 1st place!</code></p>