C-17-Q142mediumsingle_mcq
In the leap-year condition, which Python operator is used to check inequality with 0?
In the leap-year condition, which Python operator is used to check inequality with 0?
- a
=! - b
!= - c
<> - d
==!
ব্যাখ্যা
Python uses != as the inequality (not-equal) operator, so year % 4 != 0 tests whether the remainder is not 0. The forms =! and <> are not valid Python operators.