Interview Question

What is return statement?

return ends a function and provides its result.

💡 Concept ✅ Quick Revision 🐍 Python

Answer

The return statement ends a function call and supplies its result. • A bare return returns None. • Falling off the end of a function also returns None. • return exits only the current function call.

💡 Simple Example

def double(value): return value * 2 print(double(4))

Output

8

⚡ Quick Revision

return ends a function and provides its result.