Key Concepts

Review core concepts you need to learn to master this subject

or Operator

True or True # Evaluates to True True or False # Evaluates to True False or False # Evaluates to False 1 < 2 or 3 < 1 # Evaluates to True 3 < 1 or 1 > 6 # Evaluates to False 1 == 1 or 1 < 2 # Evaluates to True

The Python or operator combines two Boolean expressions and evaluates to True if at least one of the expressions returns True. Otherwise, if both expressions are False, then the entire expression evaluates to False.