1.

What happens when ‘1’ == 1 is executed?(a) we get a True(b) we get a False(c) an TypeError occurs(d) a ValueError occursThis question was posed to me in an interview for job.My question is taken from Exception Handling in portion Classes and Objects, Inheritance, Polymorphism, Encapsulation and Exception Handling of Python

Answer»

Right option is (b) we GET a FALSE

Easy explanation - It SIMPLY evaluates to False and does not raise any exception.



Discussion

No Comment Found

Related InterviewSolutions