Explanation:
-0 — Negative Zero
The expression -0 means negative zero.
But in Python, when using integers:
-0
is simply:
0
So Python treats both as the same integer value.
== — Equality Operator
The == operator checks whether two values are equal.
Python evaluates:
-0 == 0
Since -0 is equal to 0:
0 == 0
the result is:
True
print() — Display the Result
The print() function displays the result of the comparison:
print(True)
Final Output
True

0 Comments:
Post a Comment