What is the simple basic explanation of what the return statement is, how to use it in Python?
And what is the difference between it and the print state
print
return is part of a function definition, while print outputs text to the standard output (usually the console).
return
A function is a procedure accepting parameters and returning a value. return is for the latter, while the former is done with def.
def
Example:
def timestwo(x): return x*2