Why >>> False == False or True ? | SoloLearn: Learn to code for FREE!


Why >>> False == False or True ?

11/27/2016 12:43:55 PM

Herisson Ricardo

1 Answer

New Answer


False == False or True would output True as the answer. First, it checks to see if False == False. It does, so it returns True. So now it checks the True or True statement. That returns True, which is the output. Python does == before it does or. Here is a chart of the operator precedence in Python. http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html