+ 3
How to use return in Python3?
2 odpowiedzi
+ 4
We can use "return" to return some result from a function. Example:
def add(a, b) # this is a function
c = a + b
return c
d = add(2, 4) # we call the function and store its result
print(d) # prints 6
+ 2
Thanks you very much.