-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)
Matthias
  • 11,699
  • 5
  • 39
  • 45
  • 4
    Does this answer your question? [return, return None, and no return at all?](https://stackoverflow.com/questions/15300550/return-return-none-and-no-return-at-all) – Yonlif Jul 09 '20 at 11:53

1 Answers1

1

Missing return statement is the same as returning None

>>> sleep(2) is None
True
Michael Bianconi
  • 4,942
  • 1
  • 8
  • 23
  • 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? – Najeem Fazil Jul 09 '20 at 11:55
  • 1
    @NajeemFazil the type of `None` is `NoneType`. – mkrieger1 Jul 09 '20 at 11:56