← Learn to Code — Python for Beginners
ମଡ୍ୟୁଲ୍ · Making Decisions
Comparing things
Programs often need to compare two values and get True or False back — this is how they make decisions.
print(5 > 3)
print(5 < 3)
print(5 == 5)
print(5 != 3)
== (double equals) checks if two things are equal. This is different from the single = you used earlier to store a value — mixing these two up is one of the most common beginner mistakes, so it's worth remembering the difference now.