Interesting python ( Any PY Geeks out there)
I recently started learning my sixth programming language and it's PYTHON 🐍. I got something interesting here. #Code print(True!=0==True) #Output : False Discussion : If I work without checking the precedence of the operators ( != and == ), then there are two cases possible as -- 1. If != executes first (True!=0)==True (True) == True True 2. If == exexutes first True!=(0==True) True! =(False) True In both the cases, the output should be True. Even then the output is False. I will add some of the output which may be helpful to understand the problem -- print(True!=0) #True print(True!=False) #True print(0==True) #False print(True==True) #True I find it interesting and would love to know why is this False in python