Python False Keyword

The False keyword in Python is basically a Boolean value, or result of a comparison operation, or result of any other logical expression whose value evaluates in the form of True/False. For example:

x = 10
y = 20


The output is:


Note - Python is a case-sensitive language. Therefore, keep the first letter of False keyword in capital, and remaining letters are in small letter.

Python False Keyword Example

Here is an example of False keyword in Python:

print("Enter any Two Values: ", end="")
a = input()
b = input()

x = a==b
if x:
    print("\nBoth values are equal")
    print("\nBoth values are not equal")

print("\nThe value of x =", x)

The sample run with user input 500 as first and 600 as second number, is shown in the snapshot given below:

python false keyword

Python Online Test

« Previous Tutorial Next Tutorial »

Follow/Like Us on Facebook

Subscribe Us on YouTube