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





Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.
Learn PCB Designing: PCB DESIGNING TUTORIAL







Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.