Python False Keyword

Example

Print the result of the comparison 5 is greater than 6:

print(5 > 6)

Run Instance

Definition and Usage

The False keyword is a boolean value, which is the result of a comparison operation.

The False keyword is equivalent to 0 (True is equivalent to 1).

More Examples

Example

Other comparisons that return False:

print(5 > 6)
print(4 in [1,2,3])
print("hello" is "goodbye")
print(5 == 6)
print(5 == 6 or 6 == 7)
print(5 == 6 and 6 == 7)
print("hello" is not "hello")
print(not(5 == 5))
print(3 not in [1,2,3])

Run Instance

Related Pages

True Keyword

Please visit our Python Operators Learn more about comparison in Chinese.