Assign value returned from function to a variable : Return « Function « Python
- Python
- Function
- Return
Assign value returned from function to a variable
def square(x) :
return x * x
print square(10)
x = 10
x = square(x)
print x
Related examples in the same category