I tried to print(2 ** 3 ** 2) to test precedence order, but in Python then Python returned me 512.0 as result. I expected Python would take 2 first, then to the power 3 = 8. Then 8, to the power 2 returning 64 as result (since operations are read from left to the right).
But instead, Python read 2 ** 3 ** 2 = 2 ** 9 = 512 (from right to the left).
Could someone explain why did this happen?
It is described to behave that way in the docs
To be pedantic your question is not about precedence in this case, but rather associativity.