expressionsoperatorsand precedence in the previous sectionwe demonstrated how names can be used to identify existing objectsand how literals and constructors can be used to create instances of built-in classes existing values can be combined into larger syntactic expressions using variety of special symbols and keywords known as operators the semantics of an operator depends upon the type of its operands for examplewhen and are numbersthe syntax indicates additionwhile if and are stringsthe operator indicates concatenation in this sectionwe describe python' operators in various contexts of the built-in types we continuein section by discussing compound expressionssuch as cwhich rely on the evaluation of two or more operations the order in which the operations of compound expression are evaluated can affect the overall value of the expression for this reasonpython defines specific order of precedence for evaluating operatorsand it allows programmer to override this order by using explicit parentheses to group subexpressions logical operators python supports the following keyword operators for boolean valuesnot unary negation and conditional and or conditional or the and and or operators short-circuitin that they do not evaluate the second operand if the result can be determined based on the value of the first operand this feature is useful when constructing boolean expressions in which we first test that certain condition holds (such as reference not being none)and then test condition that could have otherwise generated an error condition had the prior test not succeeded equality operators python supports the following operators to test two notions of equalityis same identity is not different identity =equivalent !not equivalent the expression is evaluates to trueprecisely when identifiers and are aliases for the same object the expression = tests more general notion of equivalence if identifiers and refer to the same objectthen = should also evaluate to true yet = also evaluates to true when the identifiers refer to