0

I recently missed parenthesis in an if statement in the code and code still works.

a = True  
b = False  
c = True  
if a if b else c:  
    print 'Hello'

I used K-map to get the solution and this statement is equivalent to

(a and b) or (not b and c)  

Can anyone explain why is this happening?

Sanindra
  • 70
  • 7

0 Answers0