A Simple function definition: return a tuple. : Function Return « Function « Python






A Simple function definition: return a tuple.

A Simple function definition: return a tuple.



def quadcube (x):
     return x**2, x**3
 
a, b = quadcube(3)

print a

print b

           
       








Related examples in the same category

1.Define function: return int value Define function: return int value
2.Return more than one parametersReturn more than one parameters
3.Save function result into a variableSave function result into a variable
4.Return three value Return three value