Python by Swaroop C H - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

Associativity

Operators are usually associated from left to right i.e. operators with same precedence are evaluated in a left to right manner. For example,2 + 3 + 4 is evaluated as(2 + 3) + 4. Some operators like assignment operators have right to left associativity i.e.a = b = c is treated asa = (b = c).