KIIT Polytechnic logo Students Hub KIIT Polytechnic साइन इन
▲बोर्ड ◆नोट्स ≡सिलेबस ▦टाइमटेबल ?डाउट ▶रील्स 🎮सीखें 🐍कोर्स ◈मौके ✍ब्लॉग ▮स्टोर ★टीम ⌕खोजें
← 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.