Python Interview Questions

Learn Python in Less than 8 Hrs Sitting @ Home /Desk with HandsOn

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


Premium Training : Spark Full Length Training : with Hands On Lab

Previous Next

Home Spark Hadoop NiFi Java

Disclaimer :

1. Hortonworks® is a registered trademark of Hortonworks.

2. Cloudera® is a registered trademark of Cloudera Inc

3. Azure® is aregistered trademark of Microsoft Inc.

4. Oracle®, Java® are registered trademark of Oracle Inc

5. SAS® is a registered trademark of SAS Inc

6. IBM® is a registered trademark of IBM Inc

7. DataStax ® is a registered trademark of DataStax

8. MapR® is a registered trademark of MapR Inc.

2014-2017 © | Dont Copy , it's bad Karma |