84.3k views
0 votes
What does return do in python. In comparison to print.

(Currently I know it return goes back to original value or a caller but please correct me)

User Anna T
by
5.1k points

1 Answer

5 votes

Answer:

return() in Python

The return() statement, like in other programming languages ends the function call and returns the result to the caller. It is a key component in any function or method in a code which includes the return keyword and the value that is to be returned after that.4 Oct 2022

User Mercury Platinum
by
4.7k points