None object

None means empty object. In Python there is one and only such an object (singleton).

None is used in this cases:

  • It is default return value of all functions. So if don't explicitly specify return in the function it will return None.

  • Also it used as argument value for passing to a function to mark empty list (or other mutable).

Also, it worth to note that None doesn't have attributes and in boolean operations is being treated as False.

Last updated

Was this helpful?