×

Python Tutorial

Python Basics

Python I/O

Python Operators

Python Conditions & Controls

Python Functions

Python Strings

Python Modules

Python Lists

Python OOPs

Python Arrays

Python Dictionary

Python Sets

Python Tuples

Python Exception Handling

Python NumPy

Python Pandas

Python File Handling

Python WebSocket

Python GUI Programming

Python Image Processing

Python Miscellaneous

Python Practice

Python Programs

Python False Keyword

By IncludeHelp Last updated : December 07, 2024

Description and Usage

The 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

Syntax of False keyword:

False

Sample Input/Output

Input:
x = False

# print
print(x)

Output:
False

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!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.