← Back to videos

Mock interview with Ivan for a Junior Python developer position

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Passed interview Level: Entry-level Junior

The candidate passed: despite being early in his learning journey and stumbling on a few deeper nuances (namespaces vs scopes, iterator vs generator trade-offs), he relied on sound common sense, resisted misleading prompts, and honestly stated knowledge boundaries. His pragmatic reasoning about why language features exist outweighed minor terminology gaps.

Candidate: Ivan
Target role: Junior Python Developer

Former Deputy CEO for Finance with a long economics career · transitioning into Python development while completing training courses

Answers accuracy 14 total
71% score
Theory
7/14 correct · 71%
Live coding
0/0 correct · 0%
Practical task
No live coding
Topics covered Click a topic to filter questions

Candidate strengths

  • + Sound common-sense reasoning about why features exist rather than reciting memorized definitions
  • + Resilience against misleading follow-up prompts and calm defense of his conclusions
  • + Honest acknowledgment of knowledge gaps without guessing wildly or wasting interview time
  • + Mature grasp of team collaboration, maintenance costs, code readability, and PEP 8 conventions

Areas to improve

  • → Clarify the difference between namespaces and lexical scopes (the LEGB lookup rule)
  • → Sharpen iterator vs generator terminology so loop constructs aren't conflated with iterator objects
  • → Review CPython list internals (dynamic array of pointers) vs linked-list trade-offs and stdlib's array/deque
  • → Maintain focus late in hour-long interviews to avoid fatigue-induced slips of the tongue

Questions in this interview

14 / 14
01 ▶ 04:44
What loops exist in Python, are 'for' and 'while' interchangeable, and which is more Pythonic for traversing collections?
Theory Control flow, loops & syntactic sugar
?
Candidate's answer

Named for and while, illustrated event-driven while loops with a Snake game loop, and added that for is the Pythonic choice for collections since it avoids manual indexing.

Key takeaway

Any for-loop can be rewritten with while and manual indexing/next(), but direct element iteration with for is cleaner, faster, and prevents off-by-one bugs.

Open moment on YouTube ↗
#01
02 ▶ 13:31
How do function parameters and arguments differ, and when is each specified?
Theory Functions, scopes & closures
?
Candidate's answer

Without relying on a memorized definition, deduced accurately that parameters are declared in the function signature while arguments are the values supplied when calling it.

Key takeaway

Parameters declare local bindings in the def header, whereas positional and keyword arguments supply concrete object references at call time.

Open moment on YouTube ↗
#02
03 ▶ 15:03
Why can't main program code access a variable declared inside a function, and what is variable scope?
Theory Functions, scopes & closures
?
Candidate's answer

Explained that isolating local variables inside functions prevents naming collisions and unintended coupling in large programs, distinguishing local from global variables.

Key takeaway

Each function call creates an isolated local stack frame whose bindings cannot be read from outer code and are discarded on return unless captured in a closure.

Open moment on YouTube ↗
#03
04 ▶ 19:38
What is a namespace in Python and how does it differ from a scope?
Theory Functions, scopes & closures
?
Candidate's answer

Admitted conflating namespaces with scopes and declined to guess.

Key takeaway

A namespace is a concrete name-to-object mapping (like a module or frame dict), while a scope is a lexical region of code with rules (LEGB) for searching namespaces.

Open moment on YouTube ↗
#04
05 ▶ 20:48
What core data types exist in Python, and why does Decimal exist alongside float?
Theory Data types, numbers & memory
?
Candidate's answer

Named str, int, float, and accurately explained Decimal's precision for rounding-sensitive math, but mistakenly assumed Python has a separate char type for string characters.

Key takeaway

Python has no separate char type (single characters are length-1 str objects), and decimal.Decimal avoids binary IEEE 754 representation errors in financial arithmetic.

Open moment on YouTube ↗
#05
06 ▶ 23:05
How does a data type differ from a data structure, and does Python have classic arrays?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Separated the nature of a value (data type) from storage/access organization (data structure) and contrasted C's contiguous homogeneous arrays with Python's heterogeneous list, without recalling stdlib's array module.

Key takeaway

Python's list supports mixed types by storing a contiguous array of PyObject pointers, while array.array and numpy.ndarray store compact homogeneous primitives.

Open moment on YouTube ↗
#06
07 ▶ 27:32
What is a linked list, is it built into Python, and how does it compare practically to list?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Correctly explained node-plus-next-pointer chains and deduced you can implement custom linked structures in Python, but could not identify practical tasks where linked lists beat list.

Key takeaway

Python's collections.deque provides O(1) appends and pops at both ends using blocks of doubly linked nodes, whereas list.pop(0) shifts all elements in O(n).

Open moment on YouTube ↗
#07
08 ▶ 32:47
Why care about code readability if the program already runs and produces the right result?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Gave a strong engineering answer covering team collaboration, developer turnover, maintenance cost, and how quickly even one's own code becomes hard to decipher.

Key takeaway

Production code is read and modified far more often than it is written; clear naming and low cognitive complexity directly reduce maintenance cost and bugs.

Open moment on YouTube ↗
#08
09 ▶ 35:26
What role do indentations play in Python, will 2 spaces instead of 4 break execution, and what is PEP 8?
Theory Control flow, loops & syntactic sugar
?
Candidate's answer

Accurately separated Python's syntactic block indentation from PEP 8 community conventions (4 spaces, line length), noting that consistent 2-space indents still run without error.

Key takeaway

Python's parser only requires consistent indentation within each block (raising TabError on mixed tabs/spaces), while PEP 8 standardizes 4 spaces for ecosystem-wide uniformity.

Open moment on YouTube ↗
#09
10 ▶ 41:26
What does a runtime error mean in Python, and how does an exception differ from an error?
Theory Exceptions & debugging
?
Candidate's answer

Described traceback reporting (error type and line number) and gave out-of-range list indexing (IndexError) as a runtime exception in syntactically valid code, though his distinction remained tentative.

Key takeaway

Syntax errors fail at parse/compile time before execution starts, whereas runtime exceptions arise during valid bytecode execution and can be caught and handled.

Open moment on YouTube ↗
#10
11 ▶ 46:28
What is an interpreter, how does interpretation differ from compilation, and is Python strictly interpreted?
Theory Python internals, bytecode & runtime
?
Candidate's answer

Explained whole-program ahead-of-time compilation into machine code versus on-the-fly execution by an interpreter, noting that Python has compiled implementations as well as an intermediate bytecode step.

Key takeaway

CPython compiles source to bytecode and interprets it on a VM, while PyPy uses a tracing JIT and tools like Cython/Nuitka compile to native binaries via C.

Open moment on YouTube ↗
#11
12 ▶ 50:10
What is an IDE and how does it differ from a plain text editor?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Defined IDEs and plugin-driven editors like VS Code as developer environments providing live diagnostics, autocomplete, and language-specific tooling.

Key takeaway

An IDE integrates editing, static analysis/LSP, debugging, test runners, and Git tooling, catching typos and type mismatches before code ever runs.

Open moment on YouTube ↗
#12
13 ▶ 51:15
What are iterators and generators (yield) in Python, and how do they differ in memory usage and ergonomics?
Theory Decorators, iterators, generators & context managers
?
Candidate's answer

Accurately explained step-by-step evaluation via next(), state suspension with yield, and avoiding intermediate lists in memory, but initially called the for-loop itself an iterator and tangled up memory comparisons.

Key takeaway

Every generator is an iterator: both custom __iter__/__next__ classes and yield functions stream values lazily in O(1) memory, with yield eliminating boilerplate state classes.

Open moment on YouTube ↗
#13
14 ▶ 58:26
What are lambda functions in Python, and when are they genuinely useful instead of an inline expression in a loop?
Theory Functions, scopes & closures
?
Candidate's answer

Explained that lambda defines compact single-expression anonymous functions without def, struggling at first to justify it against a plain loop before citing higher-order calls like map().

Key takeaway

A lambda is a single-expression anonymous callable ideal for short inline callbacks in higher-order functions such as sorted(..., key=...), min(), max(), and map().

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

Ivan successfully passed the interview, although not without difficulty. At some point Ivan decided to leave the finance and economics field and focus directly on development. The choice fell on the profession of Python developer. And despite the fact that Ivan is still only at the very beginning of the journey, he's already making his first successes.

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