Q91. What is the purpose of magic method __init__?  

Ans : you don't have to invoke it directly. The invocation is realized behind the scenes. When you create an instance x of a class A with the statement "x = A()", Python will do the necessary calls to __new__ and __init__.

 

Q92. If Python fully object oriented language?

Ans : No, Python doesn't support strong encapsulation, which is only one of many features associated with the term "object-oriented".

The answer is simply philosophy. Guido doesn't like hiding things, and many in the Python community agree with him.

 

Q93. How can you ignore an exception?

Ans : Using pass , see below example

 

try:

  doSomething()

except:

  pass

 

 

Why Dont you prepare for Python Certifications and Interview Questions with 250+ Questions and Answer : Check Here

Real Exam Number of Questions: 70 Questions
Real Exam Pass Score: 70%
Time Allotted: 90 minutes to complete exam