The function will exit at the first
return it finds. So in your example the first
return returns sqr and exits the function never reaching the second
return.
You can return as many values as you want in a single
return using a tuple. Just separate them with a comma:
def f(x):
power = x ** 2
sqr = x ** (1.0 /2)
return sqr, power
x = 2
sqr, power = f(x)
print "The square root of", x, "is", sqr
print "The power of", x, "is", power
Notice how the values are unpacked into both variables when the function returns.