← Back to videos

Mock interview with Kirill for a Junior Python developer position

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Needs more practice Level: Beginner (practical coding ahead of theory)

The candidate did not pass yet: while he reads Python code confidently and draws on real Django project experience, his foundational mental models (compilation vs interpretation, bytecode, why classes and None exist, parameters vs arguments) are unsystematic and break down under 'why' questions. The interviewer advised studying CS fundamentals and practicing concise technical explanations.

Candidate: Kirill
Target role: Junior Python Developer

Printing university graduate from the book industry · learning Python since 2021, completed a bootcamp, launched a live intercity taxi site on Django/DRF, studying FastAPI & SQLAlchemy

Answers accuracy 14 total
61% score
Theory
5/13 correct · 58%
Live coding
1/1 correct · 100%
Practical task
Solved

Code reading: trailing-comma tuple and isinstance()

Shown print(isinstance((x,), int)) on the whiteboard with a trailing comma after the integer, the candidate immediately answered False, pointed out that the comma constructs a tuple, and accurately explained isinstance()'s arguments and stdout output.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Sharp code-reading instincts: immediately spotted the trailing-comma tuple and explained isinstance() accurately
  • + Hands-on experience shipping a working Django web application and familiarity with real-world patterns
  • + Solid grasp of bound methods (self), NoneType singleton memory semantics, and the pass statement
  • + Honest admission when encountering unfamiliar terms rather than bluffing

Areas to improve

  • → Clarify runtime fundamentals: CPython (written in C, not C++), bytecode, the PVM, and compiled vs interpreted execution
  • → Articulate core 'why' concepts clearly — especially bundling state with behavior in classes and practical roles of None
  • → Review foundational terminology: parameters vs arguments, data structures (linked lists), and __new__ vs __init__
  • → Practice explaining design choices concisely as in team standups and architecture discussions

Questions in this interview

14 / 14
01 ▶ 04:41
What are translators, compilers, and interpreters, and do compiled implementations of Python exist?
Theory Python internals, bytecode & runtime
?
Candidate's answer

Correctly noted syntax parsing before execution and Python's compilation to bytecode, but mistakenly said CPython is written in C++, called C++ and Java low-level languages, and denied that compiled Python implementations exist.

Key takeaway

Translator encompasses both compilers and interpreters; reference CPython is written in C, C++/Java are high-level languages, and Python has JIT/AOT compilers like PyPy, Cython, and Nuitka.

Open moment on YouTube ↗
#01
02 ▶ 08:15
What is bytecode in Python?
Theory Python internals, bytecode & runtime
?
Candidate's answer

Guessed only 'a sequence of bytes' and honestly admitted he could not explain what bytecode represents or how it is executed.

Key takeaway

Python bytecode is a compact, platform-independent instruction set (inspectable via the dis module) executed by the stack-based Python Virtual Machine rather than raw CPU hardware.

Open moment on YouTube ↗
#02
03 ▶ 13:21
How does a class differ from a function, and when should a developer choose classes over plain functions?
Theory OOP, classes & dunder methods
?
Candidate's answer

Aptly compared a class to defining a custom data type with dunder methods like __eq__ and mentioned Django CBVs vs FBVs, but could not articulate the general criterion for choosing classes over functions.

Key takeaway

Plain functions excel at stateless transformations, whereas classes shine when bundling persistent state (attributes) together with the behavior (methods) operating on that state.

Open moment on YouTube ↗
#03
04 ▶ 15:52
What is a data type in Python and how does it relate to duck typing?
Theory Data types, numbers & memory
?
Candidate's answer

Defined a data type as an object's class and supported methods (such as append and pop on list), illustrated subclassing list, and explained duck typing in terms of supported behavior.

Key takeaway

Every Python type is a class inheriting from object, and duck typing relies on whether an object implements the expected protocol methods rather than its concrete class hierarchy.

Open moment on YouTube ↗
#04
05 ▶ 17:55
How does a data structure differ from a data type, and how does a singly linked list differ from Python's list?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Tried splitting primitives into data types and collections into data structures, then honestly admitted he was guessing and did not know singly linked lists.

Key takeaway

A data structure is the underlying memory layout and access scheme (dynamic array, hash table, linked nodes), while a data type is the language-level interface built on top of it.

Open moment on YouTube ↗
#05
06 ▶ 24:20
What is a method in Python, what does 'self' represent, and what kinds of methods exist on a class?
Theory OOP, classes & dunder methods
?
Candidate's answer

Accurately explained that a function on a class becomes a bound method on an instance, receiving the instance reference as 'self' to work with its attributes, and named @classmethod and @staticmethod.

Key takeaway

Functions on a class act as non-data descriptors (__get__), producing a bound method upon instance access that automatically injects the instance as 'self'.

Open moment on YouTube ↗
#06
07 ▶ 26:20
How is a class instance created and initialized in Python: what are the respective roles of __new__ and __init__?
Theory OOP, classes & dunder methods
?
Candidate's answer

Correctly identified __init__ as the initializer and recalled __new__, but did not know how __new__ works and mistakenly thought an object isn't created without variable assignment and that __new__ calls __init__ directly.

Key takeaway

Calling MyClass() runs type.__call__: first __new__(cls, ...) allocates and returns the new instance, and then __init__(self, ...) initializes its attributes in place.

Open moment on YouTube ↗
#07
08 ▶ 30:35
Is there a difference between function arguments and function parameters?
Theory Functions, scopes & closures
?
Candidate's answer

Stated that he was unfamiliar with the term 'function parameters' and declined to guess.

Key takeaway

Parameters are the formal variable declarations in a function's def signature, while arguments are the actual values passed at the call site.

Open moment on YouTube ↗
#08
09 ▶ 32:00
What is object-oriented programming, and does using Python's built-in classes automatically make your code OOP?
Theory OOP, classes & dunder methods
?
Candidate's answer

Sensibly argued that merely calling built-in types and library objects does not make code object-oriented, though he reduced OOP simply to writing custom classes.

Key takeaway

OOP is defined not merely by writing 'class', but by modeling domain entities with encapsulated state, clear interfaces, abstraction, and polymorphism.

Open moment on YouTube ↗
#09
10 ▶ 34:22
What does print(isinstance((x,), int)) on the whiteboard output, and why?
Live coding Data types, numbers & memory
?
Candidate's answer

Immediately predicted False, spotting the trailing comma that constructs a 1-element tuple and explaining how isinstance checks whether the first argument is an instance of int.

Key takeaway

It is the trailing comma — not the parentheses — that creates a 1-tuple in Python, and isinstance(obj, classinfo) checks class membership including inheritance.

Open moment on YouTube ↗
#10
11 ▶ 35:57
What is None in Python, how many None instances exist in memory, and why do we need it in real code?
Theory Data types, numbers & memory
?
Candidate's answer

Accurately named NoneType and explained that None is a single shared object in memory, but froze up when trying to give everyday use cases beyond pre-initializing a variable.

Key takeaway

The None singleton denotes explicit absence of a value: implicit return of void functions, safe sentinel default for optional/mutable arguments, and Python's mapping for SQL/JSON null.

Open moment on YouTube ↗
#11
12 ▶ 40:26
Why does Python have the 'pass' statement, and how does it differ from None?
Theory Control flow, loops & syntactic sugar
?
Candidate's answer

Clearly separated the two: None is a data object, whereas pass is a no-op statement required where Python syntax demands an indented suite (empty functions, classes, if, or except blocks).

Key takeaway

pass is a syntactic no-op statement that satisfies Python's non-empty indented block grammar, whereas None (and Ellipsis ...) are expression values.

Open moment on YouTube ↗
#12
13 ▶ 45:30
How does a bug/error differ from an exception in Python, and what happens when accessing a missing dictionary key?
Theory Exceptions & debugging
?
Candidate's answer

Separated logical flaws from exception classes inheriting from BaseException, explaining that indexing a missing dict key raises KeyError and halts execution unless caught.

Key takeaway

All Python exceptions inherit from BaseException; d[key] raises KeyError on missing keys, while d.get(key, default) returns a fallback without raising.

Open moment on YouTube ↗
#13
14 ▶ 49:35
Why catch exceptions with try / except instead of simply letting the program terminate?
Theory Exceptions & debugging
?
Candidate's answer

Explained graceful recovery and expected runtime signals, citing StopIteration when exhausting a generator via next() and conditional local_settings imports via except ImportError in Django.

Key takeaway

Python embraces EAFP (Easier to Ask for Forgiveness than Permission), using targeted try/except blocks for graceful fallback logic, resource cleanup, and protocol signals like StopIteration.

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

Kirill started learning Python on his own while continuing to work in the book business. At first he was interested in it as a hobby, enjoying the process. But gradually he began to delve more deeply into the development process and learning needed technologies in this direction. Later, after studying the Django framework and Django REST Framework, Kirill developed a website for intercity taxi orders. And now Kirill is trying his hand at a mock interview. You will see simple, complex and tricky questions, as well as feedback at the end of the video!

On this channel I conduct mock interviews for the role of Python developer for anyone interested. This is a great opportunity to prepare for a real interview, improve your skills, get useful tips and honest feedback. I do all of this absolutely for free. However, maintaining quality requires significant time and resources. If you like my content and want to support the channel, I'll be grateful for any financial support.

https://www.tbank.ru/cf/4PYyn4udS41