Return in Python
Often when developing, we rarely look at the console, and print is only limited to display on the console. And outside of this function, we can't get this result with print. See below:
And return , the result of the operation in the function is "thrown out" through the return keyword, and the result of the operation is returned. When calling a function, there must be a container followed . Outside the function, the result can also be printed.