- 2
Return
can any one tell me about 'return'?
3 Answers
+ 4
Take a look at the explanation here:
https://www.sololearn.com/discuss/468767/?ref=app
+ 2
'Return' is used inside functions for exit them by sending back value:
def myfunc(x):
return x+2
result = myfunc(40)
print(result)
... and have nothing to do directly with try or loop statements (except for exiting function, but not only try or loop body) :P
0
thank guys . got it