Home »
Python
False keyword with example in Python
Python False keyword: Here, we are going to learn about the False keyword with example.
Submitted by IncludeHelp, on April 15, 2019
Python False keyword
False is a keyword (case-sensitive) in python, it is a Boolean value (a value of class type bool). False is the result of a comparison operation.
Syntax of False keyword
False
Example:
Input:
x = False
# print
print(x)
Output:
False
Python examples of False keyword
Example 1: Assign False to a variable, print the value and print type of False.
# python program to demonstrate example of
# False keyword
# assigning False to a variable
x = False
# printing the value
print("x: ", x)
# printing type of False
print("Type of False:", type(False))
Output
x: False
Type of False: <class 'bool'>
Example 2: Printing the result of some of the comparison operations.
# python program to demonstrate example of
# False keyword
# assigning False to a variable
x = False
# printing the value
print("x: ", x)
# printing type of False
print("Type of False:", type(False))
Output
False
False
False
False