← Back to videos

Mock interview with Alexey for a Junior Python developer position

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Passed interview Level: Solid Junior

The candidate passed confidently: answered nearly all Python, data-structure, and code-reading questions in his own words, and honestly stated boundaries instead of guessing blindly. The interviewer noted he is ready for a Junior offer, with the main growth area being clearer articulation of architectural trade-offs and tool selection criteria.

Candidate: Alexey
Target role: Junior Python Developer

Power engineering degree, 18 years in the electric power industry · studying Python intensively since February (Yandex Practicum, Stepik), OOP, Django/DRF, and SQL

Answers accuracy 13 total
85% score
Theory
7/11 correct · 82%
Live coding
2/2 correct · 100%
Practical task
Solved

Removing elements from a list while iterating

The candidate immediately spotted the anti-pattern of calling .remove() while iterating over the same list, accurately explained why shifting indices skip adjacent elements, and proposed both iterating over a list copy and an idiomatic list comprehension.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Solid grasp of Python fundamentals, object model, and data structures explained in his own words
  • + Immediate detection of the list-mutation-during-iteration bug and clean fix via list comprehension
  • + Calm, mature communication style and constructive technical dialogue
  • + Honest acknowledgment of knowledge boundaries without bluffing

Areas to improve

  • → Articulate concrete engineering criteria for choosing classes and OOP over procedural functions
  • → Justify data-structure trade-offs clearly based on access and modification patterns
  • → Explain the practical value of Big-O time and space complexity analysis more directly

Questions in this interview

13 / 13
01 ▶ 03:25
Are function parameters and arguments the same thing in Python, or how do they differ?
Theory Functions, scopes & closures
?
Candidate's answer

Clearly distinguished them using a squaring function example: parameters are declared in the def signature, whereas arguments are the concrete values passed at call time.

Key takeaway

Parameters are the variable names in a function definition, while arguments are the actual values supplied when calling the function.

Open moment on YouTube ↗
#01
02 ▶ 05:03
Why are single-letter variable names like x discouraged in production code?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Explained that single-letter names lack semantic meaning, making code harder to read and maintain for teammates and your future self.

Key takeaway

Descriptive identifiers make code self-documenting and significantly reduce cognitive load during code reviews and maintenance.

Open moment on YouTube ↗
#02
03 ▶ 06:07
Why does Python use indentation, and can you mix 2-space and 4-space indents across functions?
Theory Control flow, loops & syntactic sugar
?
Candidate's answer

Noted that 2 spaces are syntactically valid, but mixing indentation styles hurts consistency and risks errors; teams follow PEP 8's 4-space rule and wrap long lines instead.

Key takeaway

Indentation defines syntactic block structure in Python (raising IndentationError/TabError when inconsistent), and PEP 8 standardizes on 4 spaces per level.

Open moment on YouTube ↗
#03
04 ▶ 08:07
Why define custom classes if variables and functions can solve any task, and when should you choose a class?
Theory OOP, classes & dunder methods
?
Candidate's answer

Correctly described a class as an object blueprint bundling attributes and methods (e.g., Person), but struggled to formulate a concrete criterion for choosing classes over functions.

Key takeaway

Classes shine when state and behavior belong together with invariants, multiple instances are needed, or polymorphic interfaces simplify architecture.

Open moment on YouTube ↗
#04
05 ▶ 18:18
What is OOP, what are its core principles, and what qualifies code as object-oriented?
Theory OOP, classes & dunder methods
?
Candidate's answer

Named the four OOP pillars (abstraction, inheritance, encapsulation, polymorphism) and noted everything in Python is an object, but wavered on what practically distinguishes OOP design from procedural scripts.

Key takeaway

Using built-in objects like int doesn't make procedural code OOP; OOP models domain logic around interacting objects with encapsulated state and clear interfaces.

Open moment on YouTube ↗
#05
06 ▶ 22:37
What is polymorphism in Python and what practical benefit does it provide?
Theory OOP, classes & dunder methods
?
Candidate's answer

Defined polymorphism as a single interface operating on different types, illustrating it with + (__add__) on ints vs strings and len() delegating to custom __len__.

Key takeaway

Python achieves polymorphism via duck typing and dunder protocols, letting caller code work uniformly with any object implementing the expected interface.

Open moment on YouTube ↗
#06
07 ▶ 25:16
What is a Python list, and how does a 'data type' differ from a 'data structure'?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Described list as a mutable indexed collection of arbitrary objects, distinguishing data type (what values/operations are valid) from data structure (how elements are organized in memory).

Key takeaway

A data type defines value semantics and supported operations, whereas a data structure defines memory layout and algorithmic complexity.

Open moment on YouTube ↗
#07
08 ▶ 27:37
What is a singly linked list, does Python have one built in, and can you call len() on it?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Explained nodes holding a value and next-reference from head to tail, noted it isn't a built-in type, and stated len() works on a custom class if __len__ is implemented.

Key takeaway

Linked lists chain heap-allocated nodes via references; in Python's stdlib, collections.deque provides O(1) appends and pops at both ends.

Open moment on YouTube ↗
#08
09 ▶ 29:31
How does Python's built-in list differ under the hood from a singly linked list, and when is each preferable?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Accurately contrasted Python list's contiguous dynamic array (O(1) indexing, periodic overallocation) with linked list's O(n) lookup and O(1) head insertion, but struggled to defend concrete selection rules.

Key takeaway

CPython's list is a dynamic array of pointers (O(1) random access and amortized append, O(n) head insert/pop); use collections.deque for FIFO queues.

Open moment on YouTube ↗
#09
10 ▶ 35:28
What are time and space complexity, and why analyze them instead of just timing the code on modern hardware?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Correctly defined growth rate of operations and memory with input size and the space-time trade-off, though took many prompts to explain why small-input wall-clock timing isn't enough.

Key takeaway

Big-O analysis predicts how an algorithm scales as input grows — an O(n²) routine feels instant on 10 test items but stalls production on 10⁶ items regardless of CPU speed.

Open moment on YouTube ↗
#10
11 ▶ 45:28
What does calling numbers.remove(i) inside for i in numbers do when filtering values < 5, and why is it buggy?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Immediately flagged mutating a list during iteration: removing index 0 shifts the next item left while the loop index advances, skipping element 2; suggested iterating over a copy.

Key takeaway

A list iterator tracks a numeric index; removing an element in-place shifts subsequent items left (in O(n) time) and causes the iterator to skip the next element.

Open moment on YouTube ↗
#11
12 ▶ 47:21
How can you filter the list cleanly with a list comprehension, and why is it preferable?
Live coding Control flow, loops & syntactic sugar
?
Candidate's answer

Proposed building a new filtered list via a list comprehension and rebinding the variable, noting better efficiency and lower overhead than repeated removals on a copy.

Key takeaway

Filtering via [x for x in numbers if x >= 5] runs in O(n) time, whereas repeated list.remove() calls inside a loop degrade to O(n²).

Open moment on YouTube ↗
#12
13 ▶ 48:48
What is None in Python — a data type or an object — and what is it used for?
Theory Data types, numbers & memory
?
Candidate's answer

Precisely clarified that NoneType is the type while None is its sole singleton instance, used to represent the explicit absence of a value.

Key takeaway

None is the sole singleton instance of NoneType; always check for it using identity operators (x is None / x is not None) per PEP 8.

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

A strong candidate and confident interview performance!

About himself Alexey says: I confidently master Python (understanding of OOP, besides standard libraries I studied asyncio, threading, numpy, pandas libraries). I mastered SQL at an intermediate level. I know how to work with the Django framework (including writing API using Django REST Framework).

Cavernous questions, code analysis and constructive feedback at the end of the meeting!