← Back to videos

Mock interview with Dmitry for a Junior Python developer position

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Passed interview Level: Junior

Despite hasty initial slips and self-contradictions, the candidate passed for a Junior Python Developer role: the interviewer valued his ability to pause, reason aloud, and self-correct mid-answer, as well as his composure across abrupt topic shifts and tricky code edge cases.

Candidate: Dmitry
Target role: Junior Python Developer

Aspiring Python developer · ~9 months studying Python and web development (Django), taking a mock interview to benchmark his fundamentals and growth areas

Answers accuracy 14 total
68% score
Theory
5/12 correct · 71%
Live coding
0/2 correct · 50%
Practical task
Partially solved

Chained comparisons in Python: 3 < x < 7 and the 3 < x < 7 == True trap

For 3 < x < 7 with x = 5, the candidate predicted True but misexplained evaluation as coercing True to 1 < 7. On if 3 < x < 7 == True he mispredicted the branch, then fixed it via parentheses (3 < x < 7) == True while attributing the behavior to operator precedence rather than chained comparison expansion.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Strong self-correction: catches his own contradictions and reasons his way to accurate answers
  • + Calm, steady communication across sudden jumps from basic operators to concurrency and web architecture
  • + Solid conceptual grasp of threads, processes, the asyncio event loop, and I/O-bound vs CPU-bound workloads
  • + Honest acknowledgment of knowledge gaps without panic and willingness to investigate unfamiliar code behavior

Areas to improve

  • → Pause briefly before answering to structure thoughts and avoid hasty self-contradictions
  • → Learn how Python expands chained comparisons under the hood (a < b < c -> a < b and b < c)
  • → Deepen understanding of Python's object model and default dunder methods inherited from object
  • → Sharpen the architectural distinction between libraries and frameworks (Inversion of Control) and MVC vs MVT

Questions in this interview

14 / 14
01 ▶ 04:04
What are operators in Python, what categories exist, and does Python have procedures?
Theory Control flow, loops & syntactic sugar
?
Candidate's answer

Named arithmetic and logical operators acting on operands, but loosely called an operator a 'procedure' and equated procedures with the main execution thread.

Key takeaway

Operators are built-in language tokens acting on operands; Python has no separate procedure construct since every function implicitly returns None.

Open moment on YouTube ↗
#01
02 ▶ 06:11
What is the main execution thread and how does a thread differ from a process?
Theory Asyncio, threads, processes & GIL
?
Candidate's answer

Initially conflated thread and process, then corrected himself: multiple threads share memory inside one process, whereas processes have isolated memory and CPU resources.

Key takeaway

In CPython, each process runs its own interpreter and memory space, while threads within a process share object memory and contend for a single GIL.

Open moment on YouTube ↗
#02
03 ▶ 09:36
How does concurrency differ from parallelism, and which mechanism fits I/O-bound vs CPU-bound tasks?
Theory Asyncio, threads, processes & GIL
?
Candidate's answer

Initially misspoke calling single-process threads parallel, then caught the contradiction and rightly matched threads/async to I/O waits and multiprocessing to CPU-heavy work.

Key takeaway

Concurrency interleaves progress across tasks (ideal for I/O-bound work), while parallelism executes computations simultaneously on multiple CPU cores (via multiprocessing in CPython).

Open moment on YouTube ↗
#03
04 ▶ 14:14
How does asynchronous programming work in Python (event loop, coroutines) and how does it differ from multithreading?
Theory Asyncio, threads, processes & GIL
?
Candidate's answer

Clearly explained single-threaded event-loop scheduling with coroutines yielding at explicit suspension points during external I/O, avoiding OS thread context-switch overhead.

Key takeaway

asyncio uses single-threaded cooperative multitasking: coroutines yield control explicitly at await, so blocking CPU calls stall the entire event loop.

Open moment on YouTube ↗
#04
05 ▶ 19:12
What powers Python's comparison operators under the hood, and can arbitrary objects be compared?
Theory OOP, classes & dunder methods
?
Candidate's answer

First reduced operators to low-level C/CPU instructions, then recalled special comparison dunder methods on custom classes, though unsure about default fallback behavior.

Key takeaway

Comparison operators dispatch to __eq__, __lt__, etc.: object provides identity-based == / != by default, while < and > raise TypeError unless implemented.

Open moment on YouTube ↗
#05
06 ▶ 24:38
What does x = 5; print(3 < x < 7) output and how is the chained inequality evaluated?
Live coding Control flow, loops & syntactic sugar
?
Candidate's answer

Correctly predicted True, but mistakenly explained evaluation as left-to-right (3 < 5) -> True coerced to 1 < 7.

Key takeaway

Python expands chained comparisons a < x < b into (a < x) and (x < b), evaluating x only once rather than computing (a < x) < b.

Open moment on YouTube ↗
#06
07 ▶ 26:26
What happens when running if 3 < x < 7 == True: print('Caught') for x = 5, and why does the condition evaluate to False?
Live coding Control flow, loops & syntactic sugar
?
Candidate's answer

Predicted 'Caught' would print; after seeing no output, fixed it by adding parentheses (3 < x < 7) == True, guessing operator precedence was the culprit.

Key takeaway

All comparison operators (<, >, ==, is, in) share the same precedence and chain together: 3 < x < 7 == True expands to (3 < x) and (x < 7) and (7 == True), where 7 == True is False.

Open moment on YouTube ↗
#07
08 ▶ 31:37
What is OOP, and how do class attributes and methods differ from instance attributes?
Theory OOP, classes & dunder methods
?
Candidate's answer

Described OOP as modeling entities via attributes and methods, accurately distinguishing class attributes shared across all instances from per-instance attributes.

Key takeaway

Class attributes and method descriptors live in Class.__dict__ shared by all instances, whereas per-object state lives in each instance's __dict__ (or __slots__).

Open moment on YouTube ↗
#08
09 ▶ 33:33
Does an empty user-defined class have any dunder methods out of the box, and when do you override them?
Theory OOP, classes & dunder methods
?
Candidate's answer

First said an empty class has none, immediately corrected himself citing implicit inheritance from object, and gave operator / path joining and iterators as override examples.

Key takeaway

Every class inherits baseline dunders (__new__, __init__, __repr__, __str__, __eq__, __hash__) from object, while domain-specific protocols (__iter__, __truediv__, etc.) are added explicitly.

Open moment on YouTube ↗
#09
10 ▶ 36:39
How do a module, a package, a library, and a framework differ (e.g., Django vs SQLAlchemy)?
Theory Modules, packages, imports & stdlib
?
Candidate's answer

Clearly defined modules and packages (collections of modules) and noted Django's architectural structure, but struggled to distinguish frameworks from libraries beyond scale.

Key takeaway

Frameworks differ from libraries by Inversion of Control (IoC): your code calls a library, whereas a framework owns the lifecycle and calls your code.

Open moment on YouTube ↗
#10
11 ▶ 43:17
What does Django's MVT architecture stand for and how does it relate to MVC?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Accurately expanded Model-View-Template and explained Django models, request views, and HTML templates, but got confused explaining Controller vs View in classic MVC.

Key takeaway

Django's MVT maps onto MVC: URLconf + Django Views act as the Controller orchestrating request logic, while Django Templates serve as the presentation View.

Open moment on YouTube ↗
#11
12 ▶ 45:45
What is the difference between a batteries-included framework (Django) and microframeworks (Flask, FastAPI)?
Theory Modules, packages, imports & stdlib
?
Candidate's answer

Explained that Django ships batteries-included (ORM, admin, auth), whereas microframeworks provide a lean routing core assembled with external libraries as needed.

Key takeaway

Full-stack frameworks standardize ORM/auth/admin for rapid development, while microframeworks offer minimal overhead and freedom to choose each component.

Open moment on YouTube ↗
#12
13 ▶ 46:35
What is the difference between authentication and authorization?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Briefly swapped the terms, then immediately self-corrected: authentication verifies identity (who you are), while authorization checks permissions (what you are allowed to do).

Key takeaway

Authentication (AuthN, HTTP 401) verifies user identity, whereas authorization (AuthZ, HTTP 403) enforces access permissions.

Open moment on YouTube ↗
#13
14 ▶ 49:55
Are Django, Flask, and FastAPI synchronous or asynchronous web frameworks?
Theory Asyncio, threads, processes & GIL
?
Candidate's answer

Correctly stated that Django and Flask originated as synchronous WSGI frameworks that later added async support, whereas FastAPI was built async-first from the ground up.

Key takeaway

FastAPI is async-first on ASGI/Starlette, while modern Django bridges legacy WSGI with ASGI async views, middleware, and async ORM queries.

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

In this video, I conduct a technical interview with a candidate for the position of Junior Python developer — Dmitry.

The interview turned out to be ambiguous: Dmitry often gave incorrect answers off the cuff, was confused in formulations and even contradicted himself. However, when he stopped to think and analyze the question, this led to much more accurate and logical conclusions. This ability to self-correct and the ability to critically rethink your answers — a big plus for a beginning developer.

Support the video with a like if the format was helpful.

Timestamps:

00:00 Introduction
00:33 A few words about the interviewer and candidate
04:05 Theoretical questions
24:33 Code experiments and questions about them
30:55 Continuation of theoretical questions
51:25 Feedback exchange

#python #junior #interview #interview #programming #development

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://yoomoney.ru/to/4100119163947822
https://www.tbank.ru/cf/4PYyn4udS41