← Back to videos

Mock interview with Mikhail 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: despite polite communication and honest caveats when unsure, over half of the foundational questions went unanswered and he could not explain Python's mutable default argument trap in the code section. The interviewer advised revisiting core concepts by asking 'why and when to use it' for every tool.

Candidate: Mikhail
Target role: Junior Python Developer

Degree in Control in Technical Systems, 3 years as a commissioning engineer at a nuclear power plant · completed Python courses including a Django project

Answers accuracy 12 total
50% score
Theory
3/9 correct · 56%
Live coding
0/3 correct · 33%
Practical task
Not solved

Mutable default list parameter and type checking with isinstance()

In the def add_item(item, my_list=[]) snippet, the candidate handled single calls and explicit list arguments, but predicted [1] and [2] for consecutive default calls and could not explain why the default list persisted. In the second snippet with (1_000_000,), he knew isinstance() vs type() conceptually, but initially misread the 1-tuple and predicted True before self-correcting.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Honest communication and clear framing of hypotheses rather than bluffing
  • + Basic grasp of dynamic typing, local function scope, and list vs typed array differences
  • + Composed demeanor in the first half of the session and willingness to work through live examples

Areas to improve

  • → Master default argument evaluation timing in Python and the mutable default argument pitfall (def f(x=[]))
  • → Strengthen core Python concepts: types vs data structures, None/NoneType, and namespaces (LEGB)
  • → Read subtle syntax carefully, such as the trailing comma in a 1-element tuple (1_000_000,)
  • → Learn high-level differences, examples, and use cases of relational vs NoSQL databases

Questions in this interview

12 / 12
01 ▶ 04:37
What is a data type in Python, how does it differ from a data structure, and which one is list?
Theory Data types, numbers & memory
?
Candidate's answer

Described data types via int, float, and str and defined list as a mutable ordered sequence, but couldn't define 'data structure' and mistakenly claimed list is not a data type.

Key takeaway

In Python, built-in collections like list, dict, tuple, and set are first-class data types (classes) backed by concrete underlying data structures.

Open moment on YouTube ↗
#01
02 ▶ 07:00
What is an array in Python, does the language provide one, and how does it differ from a list?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Correctly explained that a list holds heterogeneous objects, whereas a typed array restricts elements to a single C-compatible type via the standard array module.

Key takeaway

array.array (and NumPy ndarray) packs homogeneous raw values contiguously in memory, using far less RAM than list's array of PyObject pointers.

Open moment on YouTube ↗
#02
03 ▶ 09:16
What is a singly linked list, and when would you choose a list, a typed array, or a linked list?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Mixed up link direction (saying each node only knows its predecessor), couldn't say what values nodes can hold, and couldn't recall use cases for linked lists.

Key takeaway

Each node in a singly linked list stores data plus a reference to the next node, giving O(1) head insertion/deletion at the cost of O(n) positional lookup.

Open moment on YouTube ↗
#03
04 ▶ 12:52
How does a tuple differ from a list, why doesn't variable reassignment mutate a tuple, and what are the benefits of immutability?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Accurately separated object immutability from rebinding a variable name to a new tuple, but couldn't articulate benefits beyond preventing accidental modification.

Key takeaway

Tuple immutability prevents accidental mutation, saves memory (no overallocation buffer), and makes tuples of hashable items valid dict keys and set members.

Open moment on YouTube ↗
#04
05 ▶ 16:25
Why aren't local function variables accessible outside, what is scope, and how does it differ from a namespace?
Theory Functions, scopes & closures
?
Candidate's answer

Explained local vs global scope well via the function-as-black-box mental model, but did not know how to define a namespace.

Key takeaway

A namespace is a concrete name-to-object mapping (dict), whereas scope is the textual region of code where that namespace is searched via the LEGB rule.

Open moment on YouTube ↗
#05
06 ▶ 21:23
Do variables and their types need prior declaration in Python, and what does dynamic typing mean?
Theory Data types, numbers & memory
?
Candidate's answer

Explained that Python requires no prior type declarations: assignment binds a name to a value, and types attach to runtime objects rather than variable names.

Key takeaway

Python is dynamically and strongly typed: types live on runtime objects rather than variable names, and incompatible operations like '2' + 2 raise TypeError.

Open moment on YouTube ↗
#06
07 ▶ 24:04
What is None in Python and what does assigning a = None actually mean?
Theory Data types, numbers & memory
?
Candidate's answer

Recognized None once written in chat and cited optional function parameters and nullable Django fields, but struggled to explain what a = None binds in memory.

Key takeaway

Assigning a = None binds the name 'a' to the singleton None object (of type NoneType) as an explicit placeholder for 'no value yet'.

Open moment on YouTube ↗
#07
08 ▶ 28:14
What does def add_item(item, my_list=[]) do when called with an explicit list versus without one?
Live coding Functions, scopes & closures
?
Candidate's answer

Initially misspoke about whether a custom list can be passed, then clarified default parameter semantics and accurately predicted [1] and [10, 1] for single calls.

Key takeaway

A default parameter makes passing that argument optional: an explicit argument overrides it, while omitting it falls back to the object stored in func.__defaults__.

Open moment on YouTube ↗
#08
09 ▶ 37:25
What do two consecutive calls add_item(1) and add_item(2) output when my_list=[] is the default, and why?
Live coding Functions, scopes & closures
?
Candidate's answer

Predicted [1] and [2], and after seeing [1] and [1, 2] realized the list stayed in memory but could not explain why Python behaves that way.

Key takeaway

Default argument expressions are evaluated once at function definition time (def), not per call; use None as the default and initialize a fresh list inside the body.

Open moment on YouTube ↗
#09
10 ▶ 40:21
What does print(isinstance(val, int)) output for val = (1_000_000,), and what are isinstance() and type() used for?
Live coding OOP, classes & dunder methods
?
Candidate's answer

Described isinstance() and runtime introspection accurately, but overlooked the 1-tuple syntax and predicted True before immediately realizing it is a tuple after running.

Key takeaway

The trailing comma in (1_000_000,) creates a 1-element tuple rather than parenthesized int; prefer isinstance() over type() checks because isinstance() respects subclass inheritance.

Open moment on YouTube ↗
#10
11 ▶ 45:47
What is SQL and what characterizes a relational database?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Defined SQL as a query language for managing data in relational databases structured as tables linked by 1:1, 1:N, and M:N relationships.

Key takeaway

Relational databases (PostgreSQL, MySQL, SQLite) enforce structured table schemas, foreign-key relations, declarative SQL queries, and ACID transactions.

Open moment on YouTube ↗
#11
12 ▶ 47:00
How do non-relational (NoSQL) databases differ from relational ones, what examples exist, and when are they used?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Mistakenly assumed NoSQL databases also store unlinked tables without indexing, and could not name a single NoSQL engine or concrete use case.

Key takeaway

NoSQL spans document (MongoDB), key-value (Redis), wide-column (Cassandra), and graph stores optimized for flexible schemas, low-latency caching, or horizontal scaling.

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

Mikhail prepared for the interview, but didn't pass it.

Nevertheless, this was an interesting conversation. We talked about the fundamentals, analyzed specially prepared code, and exchanged feedback at the end of the meeting.

Enjoy watching!