None type in python | Sololearn: Learn to code for FREE!


None type in python

Can u show me 1 codes which we can say none type

9/1/2019 2:15:44 PM

Błack Jesus❕

5 Answers

New Answer


a = None print(a) Note: None and False aren't other programming languages, null would represent None


As in the official documentation of python 3.7.4 written, None is a Built-in Constant with the definition: None¶ The sole value of the type NoneType. None is frequently used to represent the absence of a value, as when default arguments are not passed to a function. Assignments to None are illegal and raise a SyntaxError.


None is a kind of data that represents something that has no type. For example X = print("hi") print(X); The output is - hi None Bcoz, the first print statement prints "Hi" and returns None which indicates nothing. The second print statement prints that None . Got it?


Thank u all Sarthak Pokharel Cbr✔[ ZeroCharisma ] Lothar


any_variable=print("hello world") here the print() doesn't return any value that's why tha variable 'any_variable' becomes None type... you can check it by simply write type(any_variable)