Printing and returning are completely different concepts.
return is a keyword. When a
return statement is reached, Python will stop
the execution of the current function, sending a value out to where the
function was called. Use
return when you want to send a value from one point
in your code to another.
return changes the flow of the program. Using
Try our practical beginner lessons, or test your skills with our challenges.