that does not explicitly return any value?

What is the default return value for a function

that does not explicitly return any value?
A . int
B. void
C. None
D. Null
E. public

Answer: C

Explanation:

Topic: return

Try it yourself:

def func1():

pass

print(func1()) # None

def func2():

return

print(func2()) # None

If a function does not have the keyword return the function will return the value None

The same happens if there is no value after the keyword return

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments