r/PythonLearning • u/The-Turnt-Tiger • 18d ago
Help Request Need help understanding how != works
Hello, I'm working on learning the basics of try/except blocks. To do so, I'm intentionally raising errors. The question is: why is my TypeError occurring when I enter an integer? I checked the input type, and it shows as an integer, but the error is still raised. What am I missing here?
29
Upvotes


View all comments
3
u/Flame77ofc 18d ago
a != bis the same as!(a == b)like
1 != 3->True!(1 == 3)->!(False)->!False->True