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

+3

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

+9

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

+7

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.

+5

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?

+4

Thank u all Sarthak Pokharel Cbr✔[ ZeroCharisma ] Lothar

+1

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)