
PRO
Danielle
asked

Expert
Abhay Jajodia answered
Hello Danielle, really nice question.
Any time you use a comparison in Python â things like ==, >, <, >=, and so on â Python evaluates that expression and decides whether itâs true or false. The result of that decision is always a Boolean value: True or False.
For example:
total = 150
result = total > 100
print(result) # True
Here Python checks the comparison, finds that 150 really is greater than 100, and gives you True. If the comparison wasnât correct, youâd get False instead.
Thatâs just how comparisons work in Python:
they always produce a Boolean value.
If you have further questions, I'm here to help.
Python
This question was asked as part of the Learn Python Basics course.







