Using exponentiation in Python