← Back to videos

Mock interview with Tanya 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: she answered nearly every topic calmly and accurately — from Python's object/reference model and the iterator protocol to decorators, testing, and Django vs FastAPI — without falling for tricky follow-ups. Minor gaps (such as Django middleware internals and generator vs custom-iterator nuances) were acknowledged honestly without guessing.

Candidate: Tatyana
Target role: Junior Python Developer

English & German teacher and former technical translator · learning Python and SQL since 2021, completed developer courses, hackathons, and internships · first tech interview

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

Candidate strengths

  • + Strong core Python foundation: iterator protocol (__iter__ / __next__), object reference model, and function/class decorators (@dataclass)
  • + Broad practical awareness across Django, FastAPI + SQLAlchemy/Alembic, SQL vs NoSQL databases, DRY, and automated testing
  • + Calm, composed delivery on her very first technical interview and honest admission of unfamiliar topics
  • + Resilience to tricky follow-up questions and careful, deliberate phrasing

Areas to improve

  • → Clarify how generator functions relate to custom iterators and review Python list's amortized O(1) append complexity
  • → Distinguish Python's parser rule (consistent indentation per block) from PEP 8's 4-space style recommendation
  • → Study request/response middleware mechanics and common use cases in Django and FastAPI
  • → Name fundamental constructs directly (e.g., calling 'for' a loop rather than a vague 'construct') when confident

Questions in this interview

15 / 15
01 ▶ 06:28
What is code readability and what practical problem does it solve in team software development?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Explained that readable code lets teammates quickly grasp function intent, maintain, modify, and scale a codebase even after its original author leaves.

Key takeaway

Readability directly drives maintainability, cutting onboarding time, code-review friction, and defect rates as projects evolve.

Open moment on YouTube ↗
#01
02 ▶ 09:45
Why does Python use indentation, can tabs and spaces be mixed, and will 2-space indentation raise a SyntaxError?
Theory Control flow, loops & syntactic sugar
?
Candidate's answer

Correctly noted that indentation is part of Python's syntax and mixing tabs with spaces is forbidden, but mistakenly thought 2-space indents trigger a SyntaxError.

Key takeaway

Python's parser accepts any consistent indent width within a block (raising TabError on mixed tabs/spaces), whereas 4 spaces is a PEP 8 convention.

Open moment on YouTube ↗
#02
03 ▶ 12:25
What is an IDE, and are you required to write Python programs inside one?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Described an IDE as a code editor bundled with error highlighting, library completions, and DB tools, noting code can be written anywhere but IDEs make project work practical.

Key takeaway

Python source files are plain UTF-8 text runnable anywhere, while IDEs boost productivity with static analysis, refactoring, and integrated debugging.

Open moment on YouTube ↗
#03
04 ▶ 13:46
What does PEP 8 cover, why is line length capped at 79 characters, and can teams increase that limit?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Listed PEP 8 rules (naming, indentation, import order), tied the 79-char limit to viewing multiple files side-by-side without horizontal scrolling, and cited 119–120 char team conventions like Django's.

Key takeaway

PEP 8's 79-char default supports side-by-side diffs and split editors, while explicitly allowing teams to standardize wider limits like 88, 100, or 120 characters.

Open moment on YouTube ↗
#04
05 ▶ 16:15
How do numbers and strings relate to variables in Python's memory model?
Theory Data types, numbers & memory
?
Candidate's answer

Clearly explained that numbers and strings are class instances allocated in memory, while variables are named references pointing to those objects.

Key takeaway

Variables in Python are untyped labels rather than fixed-type memory boxes; type information always lives on the referenced heap object.

Open moment on YouTube ↗
#05
06 ▶ 17:41
How does a data structure differ from a data type, and how are arrays and stacks represented in Python?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Separated language-agnostic storage concepts (data structures) from language-specific types, contrasted homogeneous array.array with dynamic list, and illustrated LIFO stacks via browser history, list, and collections.deque.

Key takeaway

LIFO stacks in Python map cleanly onto list.append()/pop() or collections.deque in O(1), while array.array provides compact C-typed homogeneous arrays.

Open moment on YouTube ↗
#06
07 ▶ 21:45
How does a singly linked list differ from Python's list in memory layout and operation time complexity?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Accurately noted scattered nodes with next-pointers, lack of O(1) indexing, and O(1) head updates in linked lists, but mistakenly stated that appending to Python's list takes O(n) time.

Key takeaway

CPython over-allocates its dynamic pointer array so list.append() runs in amortized O(1), whereas inserting/popping at index 0 costs O(n).

Open moment on YouTube ↗
#07
08 ▶ 25:31
How does an iterable differ from an iterator, and how does a 'for' loop work under the hood?
Theory Decorators, iterators, generators & context managers
?
Candidate's answer

Clearly separated the two protocols: collections and strings implement __iter__ (not __next__), and a for-loop calls iter() to obtain an iterator before repeatedly calling next().

Key takeaway

Separating Iterable from Iterator lets containers spawn fresh independent iterators on every loop, whereas an iterator itself is exhausted after one pass.

Open moment on YouTube ↗
#08
09 ▶ 29:59
What are generators and generator expressions, where are they used, and how do they differ from iterators?
Theory Decorators, iterators, generators & context managers
?
Candidate's answer

Described yield, single-pass exhaustion via StopIteration, memory savings over lists, and FastAPI DB session dependencies with yield, but struggled to articulate how a generator differs from a general iterator.

Key takeaway

A generator is a specialized iterator built from a yield function or generator expression, automatically suspending its stack frame between next() calls without manual class state.

Open moment on YouTube ↗
#09
10 ▶ 33:54
What is a decorator, why use one instead of editing the function directly, and can classes be decorated?
Theory Decorators, iterators, generators & context managers
?
Candidate's answer

Defined decorators as higher-order callables that extend behavior without modifying the original function, noted reuse flexibility, and cited @dataclass as a class decorator.

Key takeaway

The @decorator syntax applies a callable transformation to a function or class at definition time, cleanly separating cross-cutting concerns from domain logic.

Open moment on YouTube ↗
#10
11 ▶ 36:57
What does the DRY principle mean, and why isn't global search-and-replace enough to manage duplicated code?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Expanded Don't Repeat Yourself, suggested extracting shared functions or base classes, and shared a team bot-project example showing how duplicated logic complicates future changes.

Key takeaway

Duplicated business logic causes divergence bugs when requirements change and one slightly modified copy gets missed during updates.

Open moment on YouTube ↗
#11
12 ▶ 40:21
How do Django and FastAPI differ, and what role does SQLAlchemy play in database access?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Contrasted batteries-included Django (built-in ORM, migrations, templates, DRF) with modular FastAPI paired with SQLAlchemy and Alembic, noting SQLAlchemy is framework-agnostic.

Key takeaway

Django bundles a tightly integrated ORM, admin, and migrations, while FastAPI focuses on async ASGI routing and Pydantic validation, pairing cleanly with standalone SQLAlchemy.

Open moment on YouTube ↗
#12
13 ▶ 43:38
What is middleware in Django and what is it used for?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Honestly admitted she had only registered third-party middleware like debug-toolbar in settings and could not explain how middleware works.

Key takeaway

Middleware forms a layered request/response pipeline around views, handling cross-cutting HTTP concerns such as sessions, authentication, CSRF, CORS, and logging.

Open moment on YouTube ↗
#13
14 ▶ 44:11
Why should developers write automated tests, and which testing frameworks are used in Python?
Theory Exceptions & debugging
?
Candidate's answer

Explained that automated tests catch regressions during refactoring, verify edge cases known to the author, and support TDD, naming both pytest and unittest.

Key takeaway

Automated tests guard against regressions in CI; stdlib's unittest follows class-based xUnit style, whereas pytest offers plain assert introspection, fixtures, and parametrization.

Open moment on YouTube ↗
#14
15 ▶ 46:45
How do relational databases differ from non-relational (NoSQL) databases?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Contrasted relational DBMSs like PostgreSQL (tables linked via keys) with non-relational stores such as key-value (Redis) and document databases (MongoDB).

Key takeaway

Relational databases enforce tabular schemas, foreign keys, and ACID joins, while NoSQL stores optimize for flexible documents, low-latency key-value caching, or horizontal scale.

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

Tanya managed and successfully passed my mock interview!

In July 2021, Tanya met Python and SQL on free courses. Since then, she has been enthusiastic about Python programming, as she liked its concise and simple syntax, similar to English, as well as its versatility and abundance of libraries.