← Back to videos

Mock interview with Christina for the role of Junior Python developer

Interview timeline Click any block to jump

Interview breakdown

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

The interviewer concluded Kristina passes at the Intern / lower-bound Junior bar (though not yet a confident Junior): she showed solid foundational reading, calm communication, and healthy live reflection during code experiments, while stumbling on string immutability, tuple hashability with mutable items, and classes without __init__.

Candidate: Kristina
Target role: Junior Python Developer

20 y/o · 3rd-year Fundamental CS & IT student, completed an internship at Rostelecom, focusing on FastAPI backend development

Answers accuracy 16 total
44% score
Theory
3/11 correct · 55%
Live coding
0/5 correct · 20%
Practical task
Partially solved

Chained comparison False == False in [False] and shadowing list with a class without __init__

On False == False in [False], the candidate predicted False and attributed the True output to operator precedence rather than comparison chaining. In the second snippet, she assumed 'list' was a reserved keyword, didn't recognize numeric underscores (10_000.000_1), and doubted attribute access without __init__, but after running the code accurately explained why the class-level items list was shared across instances.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Confident, articulate communication and honest boundary-setting rather than fabricating answers
  • + Good theoretical grasp of AST parsing, bytecode compilation, and dynamic arrays backing Python lists
  • + Sound live reasoning and ability to learn on the fly when testing hypotheses in code
  • + Independently deduced why instances shared the class-level items list after observing runtime output

Areas to improve

  • → Test conventions hands-on in code (e.g., shadowing built-ins like list) instead of treating guidelines as strict parser bans
  • → Deepen Python OOP mechanics: object instantiation without __init__, class vs instance attributes, and attribute lookup order
  • → Solidify mutability and hashability rules (str immutability and unhashable tuples containing mutable lists as dict keys)
  • → Broaden syntax fluency on chained comparisons (False == False in [False]) and numeric literal underscores (10_000.000_1)

Questions in this interview

16 / 16
01 ▶ 04:04
Where are bytes involved when running Python code, and how is source text turned into bytecode?
Theory Python internals, bytecode & runtime
?
Candidate's answer

Described lexing, AST construction, bytecode generation, and JIT compilation of hot functions, but mistakenly claimed Python never saves bytecode to disk files.

Key takeaway

CPython parses source code into an AST and compiles it to bytecode, caching imported modules on disk as .pyc files in __pycache__.

Open moment on YouTube ↗
#01
02 ▶ 08:17
Is Python an interpreted or compiled language, and what determines this?
Theory Python internals, bytecode & runtime
?
Candidate's answer

Classified Python as interpreted, noting the C reference runtime, a Java implementation, and the need for a runtime to execute scripts, without separating language spec from implementation.

Key takeaway

Compilation vs interpretation is a property of the runtime implementation: CPython compiles source to bytecode and interprets it on a VM, while PyPy adds a JIT compiler.

Open moment on YouTube ↗
#02
03 ▶ 09:48
What are bits and bytes, how many bits are in a byte, and why are powers of two used?
Theory Data types, numbers & memory
?
Candidate's answer

Initially confused raw bytes with printable token strings, then correctly identified a bit as a binary 0/1 state, 8 bits per byte, and 1024 as powers of two.

Key takeaway

Hardware logic operates on two binary states (0 and 1), making power-of-two widths natural for addressing; one modern byte holds 8 bits (2^8 = 256 values).

Open moment on YouTube ↗
#03
04 ▶ 14:11
What are collections in Python and which built-in types belong to them?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Described collections as container data structures holding arbitrary nested objects and named list and tuple, but mistakenly excluded dict and omitted set.

Key takeaway

In Python, any sized iterable container supporting len(), iteration, and 'in' (including list, tuple, dict, set, frozenset, str, and bytes) is a Collection.

Open moment on YouTube ↗
#04
05 ▶ 16:16
Is Python's str type mutable or immutable?
Theory Strings, encodings & formatting
?
Candidate's answer

Insisted that str is mutable because text can be appended to a string variable, contrasting it with tuples.

Key takeaway

Strings in Python are strictly immutable: concatenation, slicing, or replacement always allocates a new str object rather than mutating characters in place.

Open moment on YouTube ↗
#05
06 ▶ 19:58
What happens if you try to mutate a string character by index (a[1] = 'a') compared to a tuple?
Theory Strings, encodings & formatting
?
Candidate's answer

Expected index assignment to succeed on str and fail only on tuple, then self-corrected upon seeing identical TypeError exceptions that both types are immutable.

Key takeaway

Both str and tuple implement __getitem__ for indexing/slicing but omit __setitem__, raising TypeError on item assignment.

Open moment on YouTube ↗
#06
07 ▶ 24:20
Does Python have arrays, and how does built-in list differ from a classic fixed-size array?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Clearly explained that fixed-length static arrays aren't built into core syntax, while list is a dynamic array that over-allocates and resizes memory as elements are appended.

Key takeaway

CPython's list is a dynamic array of PyObject* pointers with amortized O(1) appends; typed contiguous arrays live in stdlib's array module and NumPy.

Open moment on YouTube ↗
#07
08 ▶ 26:27
What is a singly linked list, is it built into Python, and how does element access work?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Correctly stated there is no built-in singly linked list, described implementing nodes with next pointers via custom classes, and noted indexing requires sequential traversal.

Key takeaway

Linked lists offer O(1) head/node insertions and removals at the cost of O(n) indexed lookup; Python's stdlib provides collections.deque for fast two-ended operations.

Open moment on YouTube ↗
#08
09 ▶ 29:54
How should a developer choose between tuple, list, and a linked list for a task?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Sensibly chose tuple for fixed read-only records and list for mutable indexable sequences, but struggled to give a concrete everyday use case for a linked list.

Key takeaway

Use tuple for immutable records/keys, list for random access and tail appends, and deque/linked structures when frequent O(1) head pops/inserts are needed.

Open moment on YouTube ↗
#09
10 ▶ 33:12
How does a dictionary (dict) work and what objects can serve as its keys?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Explained unique key-value mapping, fast key lookup, and the requirement that keys have an unchanging hash while values can be any type including nested dicts or lists.

Key takeaway

Any hashable object (implementing a stable __hash__ consistent with __eq__) can be a dict key, enabling average O(1) lookup, insertion, and deletion.

Open moment on YouTube ↗
#10
11 ▶ 35:35
Can a tuple containing a list inside it be used as a dictionary key?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Assumed a list placed inside a tuple becomes immutable or flattens into the tuple, concluding such a tuple could be used as a dict key.

Key takeaway

A tuple is hashable only if all of its elements are recursively hashable; using ([1, 2],) as a dict key raises TypeError: unhashable type: 'list'.

Open moment on YouTube ↗
#11
12 ▶ 38:09
What does False == False in [False] evaluate to, and why do parentheses (False == False) in [False] change the result?
Live coding Control flow, loops & syntactic sugar
?
Candidate's answer

Predicted False via (False == False) -> True in [False]; after seeing True without parentheses, blamed operator precedence and couldn't explain how either order yields True.

Key takeaway

Python chains all comparison operators (including == and in): False == False in [False] expands to (False == False) and (False in [False]), evaluating to True.

Open moment on YouTube ↗
#12
13 ▶ 43:59
Does Python allow defining a custom class named list (class list: ...), or is it a syntax error?
Live coding Functions, scopes & closures
?
Candidate's answer

Predicted defining class list would fail, believing built-in type names like int and list are reserved keywords.

Key takeaway

Built-in names like list and int live in the builtins namespace rather than reserved keywords: redefining them legally shadows the built-in in the current LEGB scope, though linters warn against it.

Open moment on YouTube ↗
#13
14 ▶ 46:44
Are numeric literals with underscores like 10_000.000_1 and semicolons between statements on one line valid in Python?
Live coding Data types, numbers & memory
?
Candidate's answer

Correctly noted semicolons separate statements on a single line, but mistook 10_000.000_1 for an invalid identifier until testing it live.

Key takeaway

Since Python 3.6 (PEP 515), single underscores are valid visual digit separators in integer and floating-point literals (10_000.000_1 == 10000.0001).

Open moment on YouTube ↗
#14
15 ▶ 51:20
Will self.items.append(item) and a.items work in a class without __init__ when items = [] is defined on the class body?
Live coding OOP, classes & dunder methods
?
Candidate's answer

Assumed that without __init__ instances have no attributes, expecting self.items / a.items to fail or remain empty.

Key takeaway

__init__ is optional: when an attribute isn't found in the instance's __dict__, Python falls back to the class namespace and resolves class attribute items.

Open moment on YouTube ↗
#15
16 ▶ 56:22
Why did both a.items and b.items contain both added values, and can instances of custom class list still call built-in list methods?
Live coding OOP, classes & dunder methods
?
Candidate's answer

Accurately deduced that items is a single mutable class attribute shared across all instances, but mistakenly guessed missing methods on custom list might fall back to built-in list.

Key takeaway

Mutable class attributes are shared across all instances, and shadowing the name 'list' creates an unrelated class that only inherits from object unless it explicitly subclasses builtins.list.

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

In this episode — a mock interview with Christina. I conduct it in the usual format of a live dialogue, as close as possible to a real technical interview: without memorized answers, with reasoning, hypotheses and attempts to figure it out as you go.

We covered basic topics of computer science and Python, talked about data types and structures, discussed the differences between them and generally tested understanding of fundamental things on which a developer's everyday work is built. During the conversation, we moved from theory to practice and back, to look not only at knowledge but also at the course of thinking.

As always, we experimented with interesting code: analyzed unexpected expression results, checked popular misconceptions and saw how the language behaves in non-obvious situations. At the end — detailed feedback with analysis of strengths and growth points, so it's clear what exactly needs to be improved before real interviews.

Timestamps:

00:00 Greeting and interview plan
00:30 Introduction of participants
03:44 Theoretical questions
38:05 Working with code
01:00:20 Feedback exchange

#python #oop #interview #junior #pythoninterview #analysis #developer #programming #python #grade #junior #junior #interview #interview #practicum #yandex