← Back to videos

Public mock interview with Maxim for a Junior Python developer position

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Needs more practice Level: Pre-Junior (gaps in core fundamentals)

The candidate did not pass yet: despite 1.5 years of study, calm communication, and general familiarity with Python topics, systematic gaps surfaced in core fundamentals. He confused modules, packages, and libraries, misunderstood import memory impact, and could not explain dictionary key equality/hashing for {True, 1, 1.0} or singletons like None and Ellipsis.

Candidate: Maxim
Target role: Junior Python Developer

1.5 years learning Python · building personal pet projects and practicing technical interviews

Answers accuracy 13 total
46% score
Theory
2/8 correct · 50%
Live coding
1/5 correct · 40%
Practical task
Not solved

Dictionary key collision {True, 1, 1.0}, None, Ellipsis, and hashability

On the main snippet {True: 'да', 1: 'нет', 1.0: 'возможно'}, the candidate expected all three entries and could not explain why it prints {True: 'возможно'}. He also wrongly predicted {None: None} would raise an error, though at the end he correctly predicted TypeError: unhashable type: 'set' when using a set as a dictionary key.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Calm, composed communication without panicking under tricky follow-up questions
  • + General familiarity with ecosystem concepts (standard library, PEP 8 constant conventions, dict insertion order)
  • + Mature, receptive attitude toward detailed feedback and willingness to revisit fundamentals

Areas to improve

  • → Clarify core terminology: module (.py file), package (directory/namespace of modules), and library (collection of packages/modules)
  • → Master dict and set hash-table mechanics: how __hash__ and __eq__ interact and why True == 1 == 1.0 collide into a single key
  • → Study built-in singleton objects (None of NoneType, Ellipsis / ...) and their idiomatic uses in Python
  • → Back claims of practical experience with concrete examples, or state knowledge boundaries upfront

Questions in this interview

13 / 13
01 ▶ 03:11
What is the Python standard library, what tools does it include, and how does it differ from third-party libraries?
Theory Modules, packages, imports & stdlib
?
Candidate's answer

Explained that the standard library ships built-in with Python without extra installation, citing os, math utilities, and logging, and contrasted it with third-party packages.

Key takeaway

Python's 'batteries included' standard library ships built-in modules and packages (os, pathlib, collections, itertools, logging, etc.) without needing pip.

Open moment on YouTube ↗
#01
02 ▶ 06:20
What are a module, a package, and a library in Python, and how do they differ?
Theory Modules, packages, imports & stdlib
?
Candidate's answer

Described instructions, files, and folders all as 'packages', equated packages with libraries, and admitted he could not define what a Python module is.

Key takeaway

A module is a single .py file; a package is a hierarchical directory of modules (with __path__); a library is a broader distribution/collection of packages and modules.

Open moment on YouTube ↗
#02
03 ▶ 10:10
What role does __init__.py play in a directory, and must it contain code?
Theory Modules, packages, imports & stdlib
?
Candidate's answer

Correctly stated that __init__.py marks a folder as a regular package, can be empty, or can re-export symbols, but didn't know what happens if __init__.py is omitted.

Key takeaway

__init__.py defines a regular package and runs once on first import; without it, Python 3.3+ still supports importing the directory as an implicit namespace package (PEP 420).

Open moment on YouTube ↗
#03
04 ▶ 12:16
What is a circular import, why does it break execution, and how can you resolve it?
Theory Modules, packages, imports & stdlib
?
Candidate's answer

Accurately described mutual imports between files A and B causing runtime failure, but mistakenly believed moving imports into __init__.py fixes circularity and is the sole purpose of packages.

Key takeaway

Circular imports raise ImportError/AttributeError when accessing attributes on a partially initialized module; fix them by extracting shared dependencies into a third module, deferring imports inside functions, or using TYPE_CHECKING.

Open moment on YouTube ↗
#04
05 ▶ 16:24
Why are unused imports bad in a Python script, and what kind of memory do they affect?
Theory Modules, packages, imports & stdlib
?
Candidate's answer

Initially claimed unused imports slow down runtime execution due to memory, then backtracked to saying they only increase the .py file's size on disk by a few bytes.

Key takeaway

Importing a module executes its top-level code and loads it into RAM (sys.modules): unused imports increase startup time and memory footprint, risk import side effects, and clutter code.

Open moment on YouTube ↗
#05
06 ▶ 20:23
What is a constant in Python, can it be reassigned at runtime, and how is it denoted?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Accurately explained that Python allows reassigning constants at runtime; immutability is a team convention signaled via UPPER_CASE naming.

Key takeaway

PEP 8 specifies UPPER_CASE_WITH_UNDERSCORES for module constants, and typing.Final lets static type checkers flag accidental reassignments.

Open moment on YouTube ↗
#06
07 ▶ 22:32
What is a dictionary (dict) and what constraints apply to its keys and values?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Correctly stated values have no restrictions and mutable types like list and set cannot be keys, but misspoke backwards by saying 'hashable types cannot be keys'.

Key takeaway

Dictionary keys must be hashable (implementing a stable __hash__ and __eq__); built-in mutable containers (list, dict, set) set __hash__ = None and are therefore unhashable.

Open moment on YouTube ↗
#07
08 ▶ 24:10
Do dict and set preserve element order, and how do you access elements in a set?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Correctly noted that dict preserves insertion order while set is unordered and accessed via iteration/membership, but mistakenly claimed calling print() repeatedly on the same set reshuffles its output each time.

Key takeaway

dict guarantees insertion order, while set order depends on hash slots and PYTHONHASHSEED — arbitrary across runs (for strings/bytes) and mutations, though deterministic within a single unchanged set.

Open moment on YouTube ↗
#08
09 ▶ 26:30
What does print({True: 'да', 1: 'нет', 1.0: 'возможно'}) print, and why does it collapse to {True: 'возможно'}?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Predicted all three entries would print (doubting only whether 1.0 is a valid key) and could not explain why {True: 'возможно'} kept the first key with the last value.

Key takeaway

Because True == 1 == 1.0 and hash(True) == hash(1) == hash(1.0) == 1, dict treats all three as the same key: it retains the first inserted key object (True) while overwriting its value to 'возможно'.

Open moment on YouTube ↗
#09
10 ▶ 32:14
What restrictions apply to elements of a set?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Stated that a set cannot contain duplicate elements, but could not state the type requirement (hashability) for set members.

Key takeaway

A set is backed by a hash table just like dict keys, so every element added to a set must be hashable.

Open moment on YouTube ↗
#10
11 ▶ 33:42
Is {None: None} valid, what class is None an instance of, and does that class have any other instances?
Live coding Data types, numbers & memory
?
Candidate's answer

Wrongly predicted {None: None} would raise an error because None represents the absence of a value, and didn't know NoneType, though he guessed None is its sole instance.

Key takeaway

None is a hashable, immutable singleton instance of types.NoneType, making it completely valid as both a dictionary key and value (always compare identity via 'is None').

Open moment on YouTube ↗
#11
12 ▶ 37:05
What is the ... (Ellipsis) literal in Python, where is it used, and what does {...: ...} print?
Live coding Data types, numbers & memory
?
Candidate's answer

Recognized the Ellipsis literal, mentioned using ... as a method body placeholder, and guessed {...: ...} works by analogy with None, without knowing its type or broader uses.

Key takeaway

The ... literal evaluates to the hashable singleton Ellipsis (types.EllipsisType, repr 'Ellipsis'), used in stub/Protocol bodies, tuple[int, ...] / Callable[..., T] type hints, and NumPy multidimensional slicing.

Open moment on YouTube ↗
#12
13 ▶ 40:56
What happens if you use a set as a dictionary key, and how can you check whether a type is hashable?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Correctly predicted an error for a set key, read TypeError: unhashable type: 'set', and explained that hashable classes implement a hash function inspectable in docs or the IDE.

Key takeaway

You can test hashability directly via hash(obj); when a set-like object is needed as a dictionary key or set member, use the immutable frozenset.

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

Mock interview with Maxim for Junior Python developer with analysis of basic but very important topics. We discuss what distinguishes a module, a package and a library, what is the Python standard library, what objects can be dictionary keys, what is hashability, None/NaN/Ellipsis and circular imports. At the end — detailed feedback to the candidate and recommendations on how to close gaps in basic knowledge and prepare more effectively for interviews.

Timestamps:

00:00 Greeting and interview plan
00:34 Introduction of participants
03:08 Theoretical questions
26:22 Working with code
42:56 Feedback exchange

If the format is useful — support the video with a like, comments and subscription 😊

#python #interview #juniorpython #interviewpreparation