← Back to videos

Mock interview with Grigory for a Junior Python Developer role

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Passed with caveats Level: Junior- (lower-bound entry-level Junior)

The candidate received a borderline 'more yes than no' at the lower edge of Junior: he performed noticeably better when reading concrete code — recovering from an earlier __init__ misconception and predicting Counter's output — but repeatedly drifted into implementation details instead of answering 'why' and couldn't explain method chaining via return self.

Candidate: Grigory
Target role: Junior Python Developer

Humanities background · studying Python for under a year via self-study and Yandex Practicum

Answers accuracy 12 total
42% score
Theory
1/8 correct · 38%
Live coding
1/4 correct · 50%
Practical task
Partially solved

Counter class without __init__: class vs instance attributes, c.add().add().add() chaining, and return self

The candidate correctly read the counter logic, spotted the lowercase class naming violation, and accurately predicted outputs 0 and 3 for Counter.count vs c.count. However, he thought return self was needed to persist state without __init__, and could not explain why removing return self broke c.add().add() with AttributeError on NoneType.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Stronger footing on concrete code: accurately predicted class vs instance attribute output (0 and 3) and self-corrected his __init__ misconception
  • + Solid knowledge of PEP 8 naming conventions (CapWords/PascalCase for classes vs snake_case for functions/variables)
  • + Honest boundary-setting when unsure (declining to guess on 'dynamic programming') rather than bluffing
  • + Overcame noticeable early interview jitters and settled into a constructive discussion by the coding section

Areas to improve

  • → Stay focused on the actual question: answer conceptual 'why' questions directly instead of drifting into 'how' syntax details
  • → Structure OOP fundamentals: encapsulating state + behavior, class vs instance attribute lookup, and abstract classes (abc.ABC)
  • → Understand implicit None returns and the fluent method-chaining pattern (c.add().add() via return self)
  • → Practice explaining technical ideas concisely in plain language and build comfort with live spoken interviews

Questions in this interview

12 / 12
01 ▶ 02:57
What is object-oriented programming in plain words, and why do we need classes at all?
Theory OOP, classes & dunder methods
?
Candidate's answer

Described classes as abstractions bundling properties and methods, citing Django model inheritance and domain modeling, though he drifted into rambling implementation details.

Key takeaway

OOP encapsulates state (attributes) together with behavior (methods) behind clear interfaces to manage complexity in growing systems.

Open moment on YouTube ↗
#01
02 ▶ 07:47
Since functions in modules also structure and reuse code, how do you decide between classes and plain functions?
Theory OOP, classes & dunder methods
?
Candidate's answer

Cited function-based vs class-based views in Django and framed both as valid task-dependent tools, without pinpointing per-instance state management as the decisive factor.

Key takeaway

Prefer plain functions for stateless data transformations; reach for classes when managing per-instance state across calls or defining polymorphic hierarchies.

Open moment on YouTube ↗
#02
03 ▶ 14:24
What is a programming paradigm, what paradigms exist, and which ones does Python support?
Theory Python internals, bytecode & runtime
?
Candidate's answer

Explained paradigms clearly and rightly noted Python is multi-paradigm (supporting OOP and functional styles), while mistakenly listing 'dynamic programming' before wisely declining to guess its meaning.

Key takeaway

Python is multi-paradigm (procedural, OOP, functional), whereas dynamic programming is an algorithmic optimization technique using overlapping subproblems, not a language paradigm.

Open moment on YouTube ↗
#03
04 ▶ 16:24
What is an object in Python, and is there any difference between 'object' and 'class instance'?
Theory OOP, classes & dunder methods
?
Candidate's answer

Contrasted a class blueprint with a concrete runtime object, referenced isinstance() and root class 'object', and concluded 'object' and 'instance' are essentially synonymous in Python.

Key takeaway

Every value in Python is an object and an instance of some class; 'instance' simply emphasizes its relationship to a specific class.

Open moment on YouTube ↗
#04
05 ▶ 18:47
What is the conceptual difference between class attributes and instance attributes?
Theory OOP, classes & dunder methods
?
Candidate's answer

Remembered where each is written syntactically (class body vs self.name in __init__), but got tangled trying to explain their conceptual purpose and sharing semantics.

Key takeaway

A class attribute lives once on the class and is shared across all instances, whereas instance attributes live in each object's own __dict__ to hold unique per-object state.

Open moment on YouTube ↗
#05
06 ▶ 26:05
Why define methods on a class when a standalone function could take the object and mutate its attributes?
Theory OOP, classes & dunder methods
?
Candidate's answer

Mentioned operating directly on an instance's state and _protected conventions, but circled repeatedly and struggled to state the clean architectural reason.

Key takeaway

Methods provide encapsulation (guarding class invariants in one place) and polymorphism (calling obj.process() across subtypes without external type-switching).

Open moment on YouTube ↗
#06
07 ▶ 36:47
What are __init__ and __new__ responsible for, and can you instantiate a custom class that has no __init__?
Theory OOP, classes & dunder methods
?
Candidate's answer

Treated creation and initialization as synonyms, didn't know what __new__ does (though rightly guessing it lives on object), and mistakenly claimed a custom class without __init__ cannot be instantiated.

Key takeaway

__new__ allocates the object while __init__ populates attributes; a class without its own __init__ inherits object.__init__() and instantiates without issue.

Open moment on YouTube ↗
#07
08 ▶ 38:54
What is an abstract class in standard Python, and how do you tell it cannot be instantiated?
Theory OOP, classes & dunder methods
?
Candidate's answer

Rightly stated abstract classes aren't instantiated directly, but knowing only Django's Meta.abstract = True, mistakenly guessed lack of __init__ makes a Python class abstract.

Key takeaway

In standard Python, a class is abstract only when using abc.ABC / ABCMeta with at least one unimplemented @abstractmethod — completely unrelated to whether __init__ is defined.

Open moment on YouTube ↗
#08
09 ▶ 40:19
Does this 'counter' class (with count = 0, add(self), and no __init__) work, and what does it do?
Live coding OOP, classes & dunder methods
?
Candidate's answer

Upon seeing the snippet, immediately corrected his earlier claim about __init__, confirming c = counter() instantiates cleanly and add() increments the counter by 1.

Key takeaway

Any non-abstract Python class instantiates cleanly without __init__, and instances fall back to reading default values from class attributes.

Open moment on YouTube ↗
#09
10 ▶ 47:51
What do print(counter.count) and print(c.count) output after c = counter(); c.add().add().add()?
Live coding OOP, classes & dunder methods
?
Candidate's answer

Briefly considered 3 and 3 before settling on the right answer (0 and 3), though he inaccurately thought count was copied onto the instance at c = counter() time.

Key takeaway

Right after c = counter(), c.__dict__ is empty; self.count += 1 reads 0 from the class attribute and binds a new instance attribute count = 1 in c.__dict__, leaving counter.count == 0.

Open moment on YouTube ↗
#10
11 ▶ 55:52
What is 'self', why does add() end with 'return self', and why does removing it crash c.add().add()?
Live coding OOP, classes & dunder methods
?
Candidate's answer

Correctly identified 'self' as the instance reference, but mistakenly thought 'return self' was required to save state without __init__, and was stumped by AttributeError on NoneType when 'return self' was removed.

Key takeaway

'return self' enables fluent method chaining (c.add().add().add()); without an explicit return, Python returns None, turning the second chained call into None.add() (AttributeError).

Open moment on YouTube ↗
#11
12 ▶ 01:06:05
What code-style and naming issues (PEP 8) do you notice in the 'class counter:' snippet?
Live coding Algorithms, code reading & engineering practices
?
Candidate's answer

Immediately flagged lowercase 'class counter' and contrasted PEP 8 CapWords/PascalCase for classes with snake_case for functions and variables, while missing minor spacing/naming polish.

Key takeaway

Per PEP 8, classes use CapWords (Counter), functions/variables use snake_case, top-level definitions are separated by two blank lines, and variable names should be descriptive.

Open moment on YouTube ↗
#12
Original video description & timecodes

In this episode, we have a mock interview with Grigory for the role of Junior Python Developer. The Q&A format is designed to closely resemble a real interview.

We discuss object-oriented programming: what OOP is and why it is needed, how classes differ from functions and how to choose the right approach for a task, what programming paradigms are and which ones Python supports. We break down the basic terms separately — class, object, instance, class and object attributes, methods, and the role of `self`.

In the second part, we move on to practical work: we look at code with a counter, try to predict the output, discuss why it works exactly like that, and why `return self` might be needed. At the end — detailed feedback on the interview: what went well, where precision and depth were lacking, how not to get bogged down in details instead of answering ‘why’, and how to build confidence and the skill of explaining complex things in simple terms.

Timecodes

00:00 Welcome and interview plan
00:30 Introduction of participants
02:54 Theoretical questions
40:17 Working with code
01:08:27 Feedback session

Hashtags

#python #juniorpython #interview #it #programming #pythondeveloper #oop #interview