Interview Q&A / Object-Oriented Programming

INTERVIEW Q&A · 69 QUESTIONS

Object-Oriented Programming interview questions

The four pillars, interfaces, abstract classes and design basics.

  1. What is self in Python class methods, and why must it be written?

    self is the first parameter of an instance method and receives the object the method was called on. Python passes it automatically; the name is only a convention.

    BeginnerQuick answer1 min read