Skip to content Skip to sidebar Skip to footer

Is There Anything In Python That Is A `nonetype` Besides `none`?

I was just wondering if in Python there's any other object/instance whose type is NoneType type besides the very well known None: >>> type(None) S

Solution 1:

From the docs, None is:

The sole value of the type NoneType.

Solution 2:

None is the only NoneType , however in your case of

>>> type(???)
<type'NoneType'>

You could do something like

>>> a=None>>> type(a)
type'NoneType'

Meaning, any variable that holds None will obviously also return NoneType as its type since they are None.

Post a Comment for "Is There Anything In Python That Is A `nonetype` Besides `none`?"