and or the and of two expressions is true exactly when both of the expressions are true we can represent this definition in truth table and in this tablep and represent smaller boolean expressions since each expression has two possible valuesthere are four possible combinations of valueseach shown as one row in the table the last column gives the value of and for each possible combination by definitionthe and is true only in the case where both and are true the or of two expressions is true when either expression is true here is the truth table defining orp or the only time the or is false is when both expressions are false notice especially that or is true when both expressions are true this is the mathematical definition of orbut the word "oris sometimes used in an exclusive sense in everyday english if your mom said that you could have cake or cookies for dessertshe would probably scold you for taking both the not operator computes the opposite of boolean expression it is unary operatormeaning that it operates on single expression the truth table is very simple not using boolean operatorsit is possible to build arbitrarily complex boolean expressions as with arithmetic operatorsthe exact meaning of complex expression depends on the precedence rules for the operators consider this expressiona or not and how should this be evaluatedpython follows standard convention that the order of precedence from high to low is notfollowed by andfollowed by or so the expression would be equivalent to this parenthesized version