← Back to videos

Mock interview with Nikita for a Junior Python developer position

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Needs more practice Level: Pre-Junior (Trainee)

The candidate did not pass yet: rushing through a fast-paced bootcamp without a prior technical background left his knowledge fragmented — confusing compilers with languages, missing the mutable default argument trap, and thinking virtual environments sandbox malware. Still, he handled loops, string immutability, and web frameworks reasonably well, and received detailed guidance on rebuilding fundamentals.

Candidate: Nikita
Target role: Junior Python Developer

Humanities degree, customer support background · completed an intensive Yandex Practicum Python bootcamp and SQL course over a few months

Answers accuracy 13 total
46% score
Theory
3/9 correct · 50%
Live coding
0/4 correct · 38%
Practical task
Not solved

Mutable default argument my_list=[] and Python indentation rules

Reading def add_item(item, my_list=[]), the candidate first mistook my_list=[] for a type constraint before recalling default arguments, then predicted [1] and [2] on consecutive calls and guessed indenting return further to fix [1, 2]. During indentation experiments, he knew mixing tabs and spaces fails in principle, but missed the IDE converting Tab into 4 spaces.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Sound grasp of choosing for vs while loops and extracting reusable logic into functions
  • + Practical high-level understanding of string immutability and what a web framework like Django provides
  • + Mature self-reflection on over-relying on AI tools during bootcamp study vs hands-on experimentation

Areas to improve

  • → Learn foundational program execution concepts: source files, translators, compilers, and the CPython interpreter
  • → Master default parameter evaluation and the mutable default argument trap def f(item, my_list=[])
  • → Understand pip/PyPI package management and what venv actually isolates (dependency versions, not OS security)
  • → Practice stating 'I don't know' concisely on unfamiliar topics rather than spiraling into prolonged guesswork

Questions in this interview

13 / 13
01 ▶ 04:17
What is a code translator, and why aren't an IDE or OS terminal translators?
Theory Python internals, bytecode & runtime
?
Candidate's answer

Guessed that a translator/interpreter is the developer's IDE workspace or OS terminal shell used to navigate directories.

Key takeaway

A translator converts source code into bytecode or machine instructions; an IDE is just an editor suite, and a terminal runs an OS command shell.

Open moment on YouTube ↗
#01
02 ▶ 10:50
How do compilation and interpretation fundamentally differ, and where does Python fit?
Theory Python internals, bytecode & runtime
?
Candidate's answer

Admitted forgetting the fundamentals and guessed backwards that the Python language is a compiler while the computer hardware is the interpreter.

Key takeaway

A compiler translates an entire program ahead of execution, whereas an interpreter executes instructions at runtime; CPython compiles source to bytecode and interprets that bytecode on the PVM.

Open moment on YouTube ↗
#02
03 ▶ 14:44
To avoid copy-pasting the same code block 5 times, should you use a function or a loop, and how do their roles differ?
Theory Functions, scopes & closures
?
Candidate's answer

Suggested wrapping the block in a function and eventually landed on the core distinction: a loop repeats code at one spot immediately, while a function enables parameterized reuse anywhere.

Key takeaway

A loop repeats statements consecutively in one place, whereas a function packages parameterized logic so it can be called from multiple call sites.

Open moment on YouTube ↗
#03
04 ▶ 24:00
What loops exist in Python, and which one should you pick to repeat an action 5 times?
Theory Control flow, loops & syntactic sugar
?
Candidate's answer

Named while and for ... in, briefly blurted out while, then immediately corrected himself: when the exact iteration count (5) is known upfront, use for.

Key takeaway

Use for _ in range(5) for known iteration counts, reserving while for condition-driven loops where the number of iterations isn't known in advance.

Open moment on YouTube ↗
#04
05 ▶ 26:00
Are Python strings (str) mutable or immutable, and what happens during concatenation or reassignment?
Theory Strings, encodings & formatting
?
Candidate's answer

Correctly stated that str is immutable, and concatenating or reassigning a string creates a brand-new string object rather than mutating the original.

Key takeaway

Python strings are immutable (s[0] = 'x' raises TypeError); prefer ''.join(parts) when assembling many fragments to avoid allocating intermediate strings.

Open moment on YouTube ↗
#05
06 ▶ 28:17
How does a mutable list differ from an immutable tuple if a variable holding a tuple can still be reassigned?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Distinguished rebinding a variable name to a new tuple from mutating the container itself, noting that trying to append an element to a tuple at runtime raises an error.

Key takeaway

Reassigning a = (1, 2, 3, 4) rebinds the variable name to a newly allocated tuple; the original tuple object itself cannot be mutated in place.

Open moment on YouTube ↗
#06
07 ▶ 32:06
What does my_list=[] mean in def add_item(item, my_list=[]), and why does calling add_item(1) work with one argument?
Live coding Functions, scopes & closures
?
Candidate's answer

Initially misread my_list=[] as enforcing a list type restriction for .append(), then recalled default parameter values when asked why a single-argument call succeeds.

Key takeaway

Syntax param=default specifies a fallback default value rather than a type constraint (even type hints like param: list are not enforced at runtime by CPython).

Open moment on YouTube ↗
#07
08 ▶ 40:30
What do two consecutive calls add_item(1) and add_item(2) output, and why does the second call print [1, 2]?
Live coding Functions, scopes & closures
?
Candidate's answer

Confidently predicted [1] and [2], vaguely sensed the function reused an existing list after seeing [1, 2], and guessed indenting return further, triggering IndentationError.

Key takeaway

Default parameter objects are created once when def runs rather than on every call; use my_list=None and initialize a new list inside the function body.

Open moment on YouTube ↗
#08
09 ▶ 46:40
Must Python indentation always be 4 spaces, or will a function body indented by 2 spaces run?
Live coding Control flow, loops & syntactic sugar
?
Candidate's answer

Initially insisted indentation must be 4 spaces or a tab, then recalled seeing 2-space code on practice platforms and tentatively guessed 2 spaces would run.

Key takeaway

Python's parser accepts any consistent indent width within a single block (1, 2, or 4 spaces); 4 spaces is a PEP 8 style convention rather than a syntax rule.

Open moment on YouTube ↗
#09
10 ▶ 49:14
What happens if you mix spaces and tabs in one Python block, and why didn't pressing Tab in the IDE raise an error?
Live coding Control flow, loops & syntactic sugar
?
Candidate's answer

Correctly predicted an error from mixing tabs and spaces, but was puzzled when the snippet ran until shown that the IDE had expanded Tab into 4 spaces.

Key takeaway

Python 3 strictly forbids mixing literal tab characters (\t) and spaces in the same block (raising TabError), which modern IDEs prevent by expanding Tab to 4 spaces.

Open moment on YouTube ↗
#10
11 ▶ 51:59
What is a web framework like Django, and why use one instead of building from scratch?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Accurately described a framework in his own words as a prebuilt architectural skeleton and rule set that handles standard web plumbing so developers can focus on domain features.

Key takeaway

A framework defines application structure and inversion of control (IoC), bundling HTTP routing, ORM, migrations, and security primitives out of the box.

Open moment on YouTube ↗
#11
12 ▶ 55:51
Where does the pip package manager download a package like Django from when you run install in the terminal?
Theory Modules, packages, imports & stdlib
?
Candidate's answer

Named pip, requirements.txt, and downloading packages over the internet from a central remote repository, though didn't know PyPI by name.

Key takeaway

By default, pip queries the official Python Package Index (PyPI at pypi.org) over HTTPS, resolves dependency versions, and installs wheel (.whl) or source distributions.

Open moment on YouTube ↗
#12
13 ▶ 01:01:40
Is installing third-party packages safe, and does a Python virtual environment (venv) protect your machine from malicious packages?
Theory Modules, packages, imports & stdlib
?
Candidate's answer

Rightly noted third-party packages carry supply-chain risk, but mistakenly assumed a virtual environment sandboxes malicious code away from the host computer.

Key takeaway

A Python venv only isolates site-packages directories and dependency versions — it provides zero OS sandboxing, so installed packages run with full user permissions.

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

Nikita didn't pass the interview, but we discussed many really important questions that every beginning developer should understand. And the feedback this time was a bit broader than usual.

Nikita's path in IT began with a conscious decision to change careers and become a developer. Working in customer support, he realized he wanted to create tools that make life easier for users. Nikita has only been learning in this new field for a few months, but is already trying his hand at a mock interview.