-3

What is the type of the object that Python functions use, when a function does not return a "useful" object? For example:

from time import sleep
sleep(2)
1

1 Answer 1

1

Missing return statement is the same as returning None

>>> sleep(2) is None
True
Sign up to request clarification or add additional context in comments.

2 Comments

thanks michael for yr time but i just want to know the answer for,What is the type of the object that Python functions use, when a function does not return a "useful" object?
@NajeemFazil the type of None is NoneType.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.