+ 1
Return meaning
Return meaning return(x+y)
2 Answers
+ 2
basically it assign the value of return statement to that function
You can also make a variable of that like:
return(x+y)
You can store it in a variable:
int result = name_of_funtion
Now you can use this variable as other variables.
The result variable contains value of x+y.
+ 1
Return statement returns the value where we call to that function.
Ex-
def example():
return 'i am returning'
print(example()) #output - i am returning
If you don't specify the return statement then it won't print anything on the console.