boolean operations boolean operation returns value of eighter true or false boolean operations are ordered in priorityso if more than one boolean operation occurs in an expressionthe operation with the highest priority will occur first the following table outlines the three boolean operators in descending order of priorityoperator example not returns true if is falsereturns false otherwise and returns true if both and are truereturns false otherwise or returns true if either or is truereturns false otherwise both the and operator and the or operator use "short-circuitingwhen evaluating an expression this means python will only evaluate an operator if it needs to for exampleif is true then in an expression or ythe does not get evaluated since the expression is obviously true in similar wayin an expression and where is falsethe interpreter will simply evaluate and return falsewithout evaluating comparison and arithmetic operators the standard arithmetic operators (+-*/work with all python numeric types the /operator gives an integer quotient(for example / returns )the exponent operator is *yand the modulus operatorgiven by breturns the remainder of the division / the comparison operators (>===and !=work with numbersstringslistsand other collection objects and return true if the condition holds for collection objectsthese operators compare the number of elements and the equivalence operator = returns true if each collection object is structurally equivalentand the value of each element is identical membershipidentityand logical operations membership operators (innot intest for variables in sequencessuch as lists or strings do what you would expectx in returns true if variable is found in the is operator compares object identity for examplethe following snippet shows contrast equivalence with object identity