Home »
MCQs »
Python MCQs
The return statement is used to exit a function?
59. The return statement is used to exit a function?
- True
- False
Answer: A) True
Explanation:
The return statement is used to exit a function and go back to the place from where it was called.
Syntax of return:
return [expression_list]
In this statement, you can include an expression that will be evaluated and the resulting value will be returned. A function will return the None object if there is no expression in the statement or if the return statement itself is not present within a function's body.