1.

What does ~4 evaluate to?(a) -5(b) -4(c) -3(d) +3The question was asked during an online interview.My doubt is from Numeric Types topic in portion Variable Names, Operators, Data Types & Numeric Types of Python

Answer»

The CORRECT OPTION is (a) -5

Best EXPLANATION: ~X is EQUIVALENT to -(x+1).



Discussion

No Comment Found

Related InterviewSolutions