as in most languagesin pythonyou code more complex expressions by stringing together the operator expressions in table - for instancethe sum of two multiplications might be written as mix of variables and operatorsa sohow does python know which operation to perform firstthe answer to this question lies in operator precedence when you write an expression with more than one operatorpython groups its parts according to what are called precedence rulesand this grouping determines the order in which the expression' parts are computed table - is ordered by operator precedenceoperators lower in the table have higher precedenceand so bind more tightly in mixed expressions operators in the same row in table - generally group from left to right when combined (except for exponentiationwhich groups right to leftand comparisonswhich chain left to rightfor exampleif you write zpython evaluates the multiplication first ( )then adds that result to because has higher precedence (is lower in the tablethan similarlyin this section' original exampleboth multiplications ( and dwill happen before their results are added parentheses group subexpressions you can forget about precedence completely if you're careful to group parts of expressions with parentheses when you enclose subexpressions in parenthesesyou override python' precedence rulespython always evaluates expressions in parentheses first before using their results in the enclosing expressions for instanceinstead of coding zyou could write one of the following to force python to evaluate the expression in the desired order( yz ( zin the first caseis applied to and firstbecause this subexpression is wrapped in parentheses in the second casethe is performed first (just as if there were no parentheses at allgenerally speakingadding parentheses in large expressions is good idea--it not only forces the evaluation order you wantbut also aids readability mixed types are converted up besides mixing operators in expressionsyou can also mix numeric types for instanceyou can add an integer to floating-point number numeric type basics