0
return from a function
Can anyone please explain more on return, I can't seem to get it right
2 Answers
+ 3
For example, you have a function that adds two variables A and B: add(A, B). Within this function, you have the mechanisms which adds the two variables but then you have to return it from this function so it can be used elsewhere
0
def multiply(a,b):
return a * b
print(multiply(4,10))
console prints 40