title: nested 'and' condition in python 'if statement'
body: <p>I used nested 'and' condition in python 'if statement'  as below,</p>
  
  <pre><code>a=[3.93, 3.90, 3.92, 3.91]
  
  if (a[0] and a[1])==3.90 and (a[2] and a[3])==3.91:
  
      print(True)
  
  else:
  
      print(False)
  </code></pre>
  
  <p>While executing the code it produces the result as 'True'.</p>
  
  <p>But it needs to produce 'false' since a[2] and a[3] are not equal to 3.91 as well as a[0] and a[1] are not equal to 3.90.</p>
  
  <p>May I know the reason and the correct code?</p>