Courses / Python
11. Return Statement
The return statement is used to exit a function and return a value.
1 min read Chapter 11 of 72
Python
Return Statement
The return statement exits a function and sends a value back to the caller.
"I need a way to get results from my functions without printing them every time."
The return statement allows a function to produce a value that can be used elsewhere in the program, making functions more versatile and useful.
"I need a way to get results from my functions without printing them every time."
The return statement allows a function to produce a value that can be used elsewhere in the program, making functions more versatile and useful.