How to Define Null Variable in Python

In this article, you will learn how to define a null variable in Python. Null is used to refer to a variable or object that…

The post How to Define Null Variable in Python appeared first on CodeSource.io.


This content originally appeared on CodeSource.io and was authored by Ariessa Norramli

In this article, you will learn how to define a null variable in Python.

Null is used to refer to a variable or object that has no value.

Define Null Variable in Python

In order to define a null variable, you can use the None keyword.

a = None

print(a)
# => None

Note: The None keyword refers to a variable or object that is empty or has no value. It is Python’s way of defining null values.

The post How to Define Null Variable in Python appeared first on CodeSource.io.


This content originally appeared on CodeSource.io and was authored by Ariessa Norramli


Print Share Comment Cite Upload Translate Updates
APA

Ariessa Norramli | Sciencx (2021-02-25T10:40:36+00:00) How to Define Null Variable in Python. Retrieved from https://www.scien.cx/2021/02/25/how-to-define-null-variable-in-python/

MLA
" » How to Define Null Variable in Python." Ariessa Norramli | Sciencx - Thursday February 25, 2021, https://www.scien.cx/2021/02/25/how-to-define-null-variable-in-python/
HARVARD
Ariessa Norramli | Sciencx Thursday February 25, 2021 » How to Define Null Variable in Python., viewed ,<https://www.scien.cx/2021/02/25/how-to-define-null-variable-in-python/>
VANCOUVER
Ariessa Norramli | Sciencx - » How to Define Null Variable in Python. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/02/25/how-to-define-null-variable-in-python/
CHICAGO
" » How to Define Null Variable in Python." Ariessa Norramli | Sciencx - Accessed . https://www.scien.cx/2021/02/25/how-to-define-null-variable-in-python/
IEEE
" » How to Define Null Variable in Python." Ariessa Norramli | Sciencx [Online]. Available: https://www.scien.cx/2021/02/25/how-to-define-null-variable-in-python/. [Accessed: ]
rf:citation
» How to Define Null Variable in Python | Ariessa Norramli | Sciencx | https://www.scien.cx/2021/02/25/how-to-define-null-variable-in-python/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.