Operator Precedence

BIDMAS (sometimes called BODMAS) is an acronym commonly used to remember mathematical operator precedence - ie the order in which you evaluate each operator.

Here in the table below we see the arithmetic operators (BIDMAS), followed by bitwise, comparison then the logical operators.

Get Python Made Easy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.