Python : What is None in python ;-)

Python’s None is Null of of Java, php, javascript of other programing language.

The concept of a null keyword is that it gives a variable a neutral, or “null” behaviour.

Python’s null Equivalent: None

The equivalent of the null keyword in Python is None. It was designed this way for two reasons:

Many would argue that the word “null” is somewhat esoteric. It’s not exactly the most friendliest word to programming novices. Also, “None” refers exactly to the intended functionality – it is nothing, and has no behaviour.

In most object-oriented languages, the naming of objects tend to use camel-case syntax. eg. ThisIsMyObject. As you’ll see soon, Python’s None type is an object, and behaves as one.

Checking if a Variable is None

There are two ways to check if a variable is None. One way can be performed by using the is keyword. Another is using the == syntax. Both comparison methods are different, and you’ll see why later: