Python follows standard math precedence (PEMDAS): Parentheses first
Exponents (**)
Multiplication, Division, Floor division, Modulo (*, /, //, %)
Addition, Subtraction (+, -) So 2 + 3 * 4 equals , not . Multiplication happens before addition. When in doubt, use parentheses. (2 + 3) * 4 is clearer than relying on precedence rules. Your future self (and teammates) will appreciate the explicitness.