What does none mean in python?

silencement
Release: 2020-09-15 14:59:46
Original
63068 people have browsed it

Friends who learn Python will encounter this word in the process of learning the basics: None. So how to understand None in Python?

What does none mean in python?

None in Python is a special constant, not 0, not False, not an empty string, None means more One kind of non-existence is true emptiness.

What is None in Python? Let’s explain it below

1. None in python is a special constant

2. It is neither 0 nor False nor Empty string. It is just an object with a null value, that is, an empty object, but with no value assigned.

3. None can be used as an object, and the type of the object is: NoneTye

4. The meaning of None is more of a kind of non-existence, which is a true empty, not an empty list ([]), nor an empty string.

For example A function has no return value

What does none mean in python?

For example: id(None), None == None, not None

What does none mean in python?

The above is the detailed content of What does none mean in python?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template