Return | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
- 2

Return

can any one tell me about 'return'?

16th Jun 2017, 4:56 PM
Hasan
Hasan - avatar
3 Réponses
+ 4
Take a look at the explanation here: https://www.sololearn.com/discuss/468767/?ref=app
16th Jun 2017, 5:40 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 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
16th Jun 2017, 8:22 PM
visph
visph - avatar
0
thank guys . got it
16th Jun 2017, 8:20 PM
Hasan
Hasan - avatar