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

Latest PCEP-30-02 Practice Questions with 124 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
0 Comments