operators description yield generator function send protocol lambda argsexpression anonymous function generation if else ternary selection ( is evaluated only if is truex or logical or ( is evaluated only if is falsex and logical and ( is evaluated only if is truenot logical negation in yx not in membership (iterablessetsx is yx is not object identity tests yx > magnitude comparisonset subset and supersetx =yx ! value equality operators bitwise orset union bitwise xorset symmetric difference bitwise andset intersection shift left or right by bits additionconcatenationx subtractionset difference multiplicationrepetitionx remainderformatx yx / divisiontrue and floor - + negationidentity ~ bitwise not (inversionx * power (exponentiationx[iindexing (sequencemappingothersx[ : :kslicing xcall (functionmethodclassother callablex attr attribute reference tupleexpressiongenerator expression listlist comprehension dictionarysetset and dictionary comprehensions since this book addresses both python and xhere are some notes about version differences and recent additions related to the operators in table - numeric type basics