← Back to videos

Public mock interview with Ilya for a Junior Python developer position

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Needs more practice Level: Pre-Junior (decent vocabulary, lacks firm fundamentals)

The candidate did not pass yet: while familiar with Python terminology, basic code reading, and classic pitfalls like mutable default arguments, he gets easily rattled by follow-up questions, stumbles on core concepts (classes as objects, tuples containing mutables as dict keys, __repr__ vs __hash__), and volunteers tangential topics he cannot defend.

Candidate: Ilya
Target role: Junior Python Backend

Factory worker studying Python independently in his spare time · first mock technical interview, no prior IT experience

Answers accuracy 13 total
54% score
Theory
3/9 correct · 61%
Live coding
0/4 correct · 38%
Practical task
Partially solved

Dictionary merge operators (| and |=), None / Ellipsis keys, and id() identity

The candidate recognized .1 as float 0.1 and bet that merging dicts via 'a | b' would run, though he doubted whether Ellipsis (...) is hashable and confused __repr__ output with __hash__ when '...' printed as 'Ellipsis'. For 'a |= b', he first correctly predicted in-place mutation keeping id(a), then talked himself out of it because of the '=' sign.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Good initial technical vocabulary, including list pointer arrays and hash-table basics
  • + Managed heavy nerves well and maintained a constructive dialogue throughout his first interview
  • + Understands mutable vs immutable types and the classic mutable default argument pitfall
  • + Initially reasoned accurately about preserving object id() when mutating a dictionary in-place

Areas to improve

  • → Close foundational gaps: Python's object model (classes as objects), hashability of nested tuples, and dict vs set internals
  • → Experiment hands-on in the REPL so answers rest on verified facts rather than flipping under interviewer pressure
  • → Stay focused on the exact question asked without volunteering tangential terms that invite deeper grilling
  • → Practice standard pronunciation of English Python terminology (tuple, array, None, Ellipsis)

Questions in this interview

13 / 13
01 ▶ 03:02
What built-in data types exist in Python?
Theory Data types, numbers & memory
?
Candidate's answer

Grouped built-in types into immutable (int, float, complex, str, bool, frozenset, tuple) and mutable (list, dict, set).

Key takeaway

Answer direct inventory questions concisely first before branching into mutability or ordering classifications.

Open moment on YouTube ↗
#01
02 ▶ 04:13
How does a data type differ from a data structure, and what structures back Python's built-in collections?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Framed data types as 'what we store' vs data structures as 'how it is stored' (citing linked lists, pointer arrays, and hash tables), but got tangled on whether built-in collections count as data structures.

Key takeaway

A data type defines values and operations in the language (dict, list), while a data structure describes the underlying memory organization (hash table, dynamic pointer array).

Open moment on YouTube ↗
#02
03 ▶ 11:39
What is an array and how does Python's built-in list differ from an array?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Recalled stdlib's array module and explained that arrays store homogeneous values contiguously in memory, whereas list over-allocates an array of pointers to arbitrary objects.

Key takeaway

CPython's list stores an over-allocated array of PyObject* pointers, while array.array packs raw C values of a single type with much lower memory overhead.

Open moment on YouTube ↗
#03
04 ▶ 15:26
Which Python collections preserve element order, and which are unordered?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Identified lists and modern dictionaries as preserving insertion order, and sets as unordered.

Key takeaway

Preserving insertion order in dict became an implementation detail in CPython 3.6 and a formal language guarantee starting in Python 3.7.

Open moment on YouTube ↗
#04
05 ▶ 16:39
What restrictions apply to dict keys and values, and can a tuple containing a mutable item be a dict key?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Correctly stated keys must be hashable while values are unrestricted, but did not know whether a tuple containing a mutable list can be hashed as a key.

Key takeaway

A tuple's hash is computed from all of its elements, so a tuple containing a list raises TypeError: unhashable type: 'list' when used as a dict key.

Open moment on YouTube ↗
#05
06 ▶ 18:23
What makes an object hashable, what does __hash__ do, and where does Python use it?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Mentioned __hash__ returning a numeric value for dict key lookup, but conflated it with password hashing and forgot set membership.

Key takeaway

Hashable objects have a stable integer __hash__() consistent with __eq__() (a == b implies hash(a) == hash(b)), powering O(1) lookups in dict, set, and frozenset.

Open moment on YouTube ↗
#06
07 ▶ 22:28
What does the '|' operator do between two dictionaries (print(a | b)), and is '.1' a valid numeric literal?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Recognized .1 as float 0.1 and wavered between union and symmetric difference for 'a | b' before confirming dict merging upon execution.

Key takeaway

Added in Python 3.9 (PEP 584), 'a | b' returns a new merged dictionary where duplicate keys take their value from the right-hand dictionary 'b'.

Open moment on YouTube ↗
#07
08 ▶ 25:00
What are None and '...' (Ellipsis), what types do they belong to, and can they serve as dict keys?
Live coding Data types, numbers & memory
?
Candidate's answer

Correctly identified None as the sole instance of NoneType and named Ellipsis for '...', but mistakenly suspected Ellipsis might be mutable.

Key takeaway

'...' evaluates to the immutable, hashable Ellipsis singleton (types.EllipsisType), used in stubs, type hints like tuple[int, ...], and NumPy slicing.

Open moment on YouTube ↗
#08
09 ▶ 31:03
Why is the key '...' displayed as the word 'Ellipsis' when printing a dictionary?
Live coding OOP, classes & dunder methods
?
Candidate's answer

Initially attributed 'Ellipsis' in the printed dict to the hash function before realizing hashes aren't printed, unable to name the real mechanism.

Key takeaway

Printing a container formats its elements via __repr__(), and repr(...) returns the canonical string 'Ellipsis'.

Open moment on YouTube ↗
#09
10 ▶ 34:25
How does 'a |= b' differ from 'a = a | b' regarding object mutation and id(a)?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

First answered correctly that 'a |= b' mutates the dict in-place preserving id(a), then second-guessed himself due to '=' and predicted a new object.

Key takeaway

'a |= b' invokes __ior__() to update the existing dict in-place (preserving id(a)), whereas 'a = a | b' invokes __or__() and allocates a new dict.

Open moment on YouTube ↗
#10
11 ▶ 39:44
How is a set structured, and why does dict preserve insertion order while set does not, given both use hash tables?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Correctly noted set stores unique hashed items without values, but guessed dict ordering was added merely for convenience without knowing the memory-layout reason.

Key takeaway

Compact dicts (Python 3.6+) split storage into a dense insertion-ordered entry array plus a sparse index table to save memory, whereas set stores entries directly in sparse hash slots.

Open moment on YouTube ↗
#11
12 ▶ 43:24
What are magic (dunder) methods in Python, and do function objects have them?
Theory OOP, classes & dunder methods
?
Candidate's answer

Described double-underscore methods hooking into language behavior and surmised functions have them too (e.g., for docstrings), without naming __call__ or __doc__.

Key takeaway

Dunder methods implement Python's data-model protocols; functions are objects implementing __call__() along with attributes like __doc__, __name__, and __closure__.

Open moment on YouTube ↗
#12
13 ▶ 46:07
If everything in Python is an object, is a class itself an object?
Theory OOP, classes & dunder methods
?
Candidate's answer

Could not reconcile viewing a class as a blueprint with Python's object model, concluding that classes are not objects.

Key takeaway

In Python, a class statement creates a live class object (an instance of metaclass 'type') with its own id, attributes, and runtime mutability.

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

In this video you will see another mock interview with a candidate for a Junior Python developer position. We analyze real questions that are often asked in technical interviews, discuss the candidate's thinking, approach to solving problems and typical mistakes made by beginning developers.

If you are preparing for your first interview or want to understand what is really asked for a Junior Python position — this video will be a useful example.

In the video you will see:
• Analysis of basic and advanced Python questions
• Logic and reasoning of the candidate in real time
• Tips for interview preparation
• Feedback from the interviewer

It will be useful for everyone who wants to start a career in IT and/or understand what a technical interview might look like for Python development.

Timestamps

00:00 Greeting and interview plan
00:29 Introduction of participants
02:58 Theoretical questions
22:10 Working with code
39:48 Continuation of theoretical questions
48:44 Feedback exchange