← Back to videos

Mock Interview with Salah for a Junior Python Developer Role

16.12.2025
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 due to foundational gaps in Python collections (confusing mutability, dict key/value rules, dict_keys views, and the boolean 'in' operator). At the same time, the interviewer praised his courage in tackling the channel's first English-language mock interview after studying in Russian and noted clear learning potential.

Candidate: Salah
Target role: Junior Python Developer

From Egypt · former 5th-year medical student switching to tech, 1.5 years studying Python in Russian (Yandex Practicum), interviewed in English

Answers accuracy 14 total
50% score
Theory
4/9 correct · 61%
Live coding
1/5 correct · 30%
Practical task
Partially solved

Converting string lists via dict(), dict_keys view, and 'c' in keys

In the first snippet dict(['1€', '1$', '1£']), the candidate initially predicted an error, but once characters were swapped ('€1', '$1', '£1') he deduced how 2-char strings unpack into (key, value) and overwrite duplicate keys. In the second part, he did not recognize the dict_keys view type and forgot that 'c' in keys evaluates to a boolean (True) via a live view of the mutated dict.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Courage to take the technical interview in English despite learning Python terminology in Russian
  • + Calm demeanor and willingness to revise flawed hypotheses when shown live runtime output
  • + Successfully deduced mid-session how dict(['€1', '$1', '£1']) splits two-character strings into key-value pairs
  • + Basic intuition for when to reach for dicts (key-value mapping) and tuples (lower memory footprint)

Areas to improve

  • → Solidify mutable (list, dict, set) vs immutable (int, str, tuple, frozenset) types and English terminology
  • → Learn dictionary rules: keys must be hashable (tuples of hashable items are valid keys), while values have no type restrictions
  • → Review iteration fundamentals (both lists and tuples are iterable) and the membership operator 'in' (returns True/False)
  • → Study dynamic dictionary view objects (dict_keys, dict_values, dict_items) and practice reading short snippets in REPL

Questions in this interview

14 / 14
01 ▶ 03:32
What built-in data types in Python do you know?
Theory Data types, numbers & memory
?
Candidate's answer

Named core built-in types including strings (str), integers and other numeric types, booleans (bool), tuples, sets, and dictionaries (dict).

Key takeaway

Python built-ins group naturally into scalar immutables (int, float, bool, NoneType), sequences (str, bytes, list, tuple), sets (set, frozenset), and mappings (dict).

Open moment on YouTube ↗
#01
02 ▶ 04:30
What is a tuple in Python and how does it differ from a set?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Initially called a tuple an 'ordered set', then accurately contrasted them: tuples preserve element order, support indexing, and allow duplicates, unlike unordered sets.

Key takeaway

A tuple is an immutable indexed sequence allowing duplicate values, whereas a set is a mutable hash-based collection of unique elements without indexing.

Open moment on YouTube ↗
#02
03 ▶ 06:07
What is the difference between a list and a tuple in Python?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Correctly noted that a list can be modified after creation while a tuple cannot, but mistakenly claimed that you cannot iterate over a tuple.

Key takeaway

Lists are mutable while tuples are immutable; both implement the sequence protocol and fully support iteration, indexing, and slicing.

Open moment on YouTube ↗
#03
04 ▶ 08:24
What is iteration in Python, and can we iterate over both lists and tuples?
Theory Decorators, iterators, generators & context managers
?
Candidate's answer

Described iteration as stepping sequentially through items in a collection, but conflated iteration with mutating elements and insisted tuple iteration is restricted.

Key takeaway

Iteration reads items sequentially via __iter__ / __next__ without mutating the container; mutating a list while iterating over it is actually a common source of bugs.

Open moment on YouTube ↗
#04
05 ▶ 12:49
What is the advantage of using a tuple instead of a list when data should not change?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Explained that tuples prevent accidental modification and are more lightweight, consuming less memory than lists.

Key takeaway

In CPython, tuples avoid list over-allocation overhead, allocate faster, guarantee structural immutability, and can be used as dict keys when their elements are hashable.

Open moment on YouTube ↗
#05
06 ▶ 13:42
What is a dictionary (dict), is it an ordered collection, and can we iterate over it?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Defined a dictionary as a key-value collection accessed by key, confirming that it preserves insertion order and supports iteration.

Key takeaway

Since Python 3.7, dictionaries guarantee insertion-order preservation by language spec, and iterating directly over a dict yields its keys.

Open moment on YouTube ↗
#06
07 ▶ 14:32
Are there any restrictions on dictionary values (e.g., can a set or list be stored as a value)?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Confused key constraints with value constraints and mistakenly stated that sets and lists cannot be used inside a dictionary as values.

Key takeaway

Dictionary values have zero type restrictions in Python: lists, sets, functions, custom objects, and nested dicts are all valid values.

Open moment on YouTube ↗
#07
08 ▶ 16:16
What restrictions apply to dictionary keys, and can a list or a tuple be used as a key?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Correctly noted key uniqueness and rejected lists, but also claimed tuples cannot be dict keys and got tangled up reversing which of tuple and list is mutable vs immutable.

Key takeaway

Any hashable object can be a dict key: str, int, frozenset, and tuples containing only hashable elements work, while mutable list, dict, and set raise TypeError: unhashable type.

Open moment on YouTube ↗
#08
09 ▶ 19:25
How should a developer choose between dict, list, tuple, and set for a specific task?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Sensibly matched dict to key-value associations and tuple to fixed memory-efficient data, but said order doesn't matter in lists and suggested sets for random selection in games.

Key takeaway

Use dict for O(1) key lookups, set for uniqueness and O(1) membership/set algebra, list for mutable ordered sequences, and tuple for fixed records.

Open moment on YouTube ↗
#09
10 ▶ 22:30
What happens when running dict(['1€', '1$', '1£']) — does it build a dict or raise an error?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Predicted an error assuming dict() requires two separate lists, and upon seeing {'1': '£'} initially gave a confused explanation about list indices.

Key takeaway

dict(iterable) accepts any iterable of 2-element iterables: each 2-character string unpacks into (key, value), and duplicate key '1' is overwritten by the last pair ('1': '£').

Open moment on YouTube ↗
#10
11 ▶ 29:08
What does dict(['€1', '$1', '£1']) output after swapping the characters, and why are all three items preserved now?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Worked out the exact mechanism: each string's first character becomes the key and the second becomes the value, so unique keys '€', '$', '£' are all preserved with value '1'.

Key takeaway

If any string in the iterable had length != 2 (e.g. '10$'), dict() would raise ValueError because each element must unpack into exactly two items.

Open moment on YouTube ↗
#11
12 ▶ 32:53
What type of object does d.keys() return?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Guessed list, then switched to tuple, and after seeing dict_keys(['a', 'b']) guessed str until type() revealed <class 'dict_keys'>.

Key takeaway

In Python 3, .keys(), .values(), and .items() return lightweight view objects (dict_keys, dict_values, dict_items) rather than allocating new lists or tuples.

Open moment on YouTube ↗
#12
13 ▶ 36:37
What does print('c' in keys) output if keys = d.keys() is saved before setting d['c'] = 3?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Forgot that 'in' is a boolean membership operator, predicting first that it prints the keys and finally that it outputs nothing.

Key takeaway

The membership expression x in container always evaluates to a bool (True or False), running in O(1) average time for dict and dict_keys.

Open moment on YouTube ↗
#13
14 ▶ 43:50
Why does 'c' in keys evaluate to True even though keys = d.keys() was assigned before d['c'] = 3?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Recognized that querying keys later sees a, b, and c, but attributed it loosely to line-by-line execution adding data into keys rather than dynamic view semantics.

Key takeaway

dict_keys holds a dynamic reference to the underlying dictionary rather than a snapshot copy, so subsequent mutations to the dict are immediately reflected in the view.

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

I usually run interviews in both Russian and English, but up until now no one on the channel had been bold enough to pick the English format. Well, that finally changed — we had a brave candidate who chose to take the challenge head-on. Since he studied most of the theory in Russian while the interview itself was in English, I tried to keep the conversation as simple and clear as possible.

Unfortunately, he wasn't able to pass this time — some gaps in the fundamentals held him back. But as someone who has seen hundreds of beginner developers, I can tell when a person has potential, and he definitely does.

If you're learning Python, prepping for interviews, or just curious to hear what a real conversation sounds like — this video will be worth your time.

Timestamps:

00:00 Intro & interview outline
00:34 Participant introductions
03:31 Theory questions
22:29 Coding exercise
45:35 Feedback exchange

Hashtags:
#python #pythondeveloper #juniorpythondeveloper #codinginterview #techinterview #juniordeveloper #learntocode #programming #softwaredeveloper #pythonlearning