Python's conditional operators return Boolean values (True and False).

Table of contents
What are Booleans?
We have three lists here, two of which represent the same data.
>>> a=[1,2,3]>>> b=[1,2,3]>>> c=[4,5,6]If we wanted to ask whether two objects represent the same thing in Python, we can use the equals-equals (==) operator (a.k.a. the "equality operator"):
>>> a==bTrueThe == operator will respond with either True or False.
>>> a==cFalseTrue and False are both of the type bool, which stands for Boolean:
>>> type(True)<class 'bool'>Booleans are how we represent "yes and no" or "affirmative and negative" in Python.
Booleans are often returned when using comparison operations, like equality (==).
Expressions that return either True or False (like a == b) are sometimes called Boolean expressions.
Where are Boolean expressions used?
Boolean expressions are often used …