I have the following simple function:
def divide(x, y): quotient = x/y remainder = x % y return quotient, remainder x = divide(22, 7) <
def divide(x, y): quotient = x/y remainder = x % y return quotient, remainder x = divide(22, 7)
You can either unpack the return values when you call your method:
x, y = divide(22, 7)
Or you can just grab the first returned value:
x = divide(22, 7)[0]