← Back to videos

Mock Junior Python Developer Interview: Data Types, Hash Tables, and Code

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Needs more practice Level: Pre-Junior (foundations in progress)

Too early to pass at the Junior level: the candidate has decent CS intuition on binary representation and basic types, but his Python knowledge remains surface-level and fragile under pushback — he frequently second-guessed correct answers into contradictions and could not solve the dict/any() code task.

Candidate: Denis
Target role: Junior Python Backend

Studying Python and FastAPI for ~4–5 months via an online course, no commercial development experience

Answers accuracy 14 total
54% score
Theory
3/11 correct · 64%
Live coding
0/3 correct · 17%
Practical task
Not solved

Unary sign operators and calling any() on a dict with False values

The candidate initially thought result -= -1 and result += +1 would fail with a syntax error and did not know built-in any() / all(). After seeing the first run succeed, he deduced the unary arithmetic (result = 3), but when all dict values were set to False he predicted False and could not explain why any(d) evaluates key truthiness and returns True.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Good foundational understanding of binary/hexadecimal systems, bits, bytes, and 1024 vs 1000 storage units
  • + Sound initial intuition on core Python types, dynamic arrays backing list, and hash tables backing dict
  • + Willingness to reason step by step, successfully working out unary sign expressions (-= -1 and += +1) after execution
  • + Receptive attitude toward feedback and realistic self-assessment of knowledge gaps

Areas to improve

  • → Verify concepts hands-on in a REPL so correct answers hold up under interviewer pushback
  • → Clarify how data types/classes relate to underlying data structures in Python's object model
  • → Learn essential built-in functions such as any() and all()
  • → Master Python truthiness rules and dictionary iteration semantics (iterating keys by default)

Questions in this interview

14 / 14
01 ▶ 03:51
What are numeral systems, why do computers use binary, and where is hexadecimal useful?
Theory Data types, numbers & memory
?
Candidate's answer

Explained binary via on/off transistor states, named hex digits 0–9 and A–F, and gave a practical 6-character RGB color example (only swapping pure black #000000 and white #FFFFFF).

Key takeaway

Hexadecimal is human-friendly shorthand for binary because each hex digit maps to exactly 4 bits and two hex digits (00–FF) represent one byte (0–255).

Open moment on YouTube ↗
#01
02 ▶ 07:03
What are a bit, a byte, and a kilobyte, and why are units sometimes based on 1024 versus 1000?
Theory Data types, numbers & memory
?
Candidate's answer

Defined a bit as 0/1, a byte as an 8-bit sequence, and 1024 as 2^10, correctly noting that storage manufacturers market drives using decimal powers of 1000.

Key takeaway

Binary IEC units scale by 2^10 = 1024 (KiB, GiB) whereas decimal SI units scale by 10^3 = 1000 (kB, GB), explaining the apparent capacity difference on drives.

Open moment on YouTube ↗
#02
03 ▶ 09:15
Why did a byte standardize at 8 bits?
Theory Data types, numbers & memory
?
Candidate's answer

Connected 8 to 2^3 and reasoned that an 8-bit sequence was large enough to hold most practical character values.

Key takeaway

An 8-bit byte (popularized by IBM System/360) aligns cleanly on power-of-two boundaries and provides 256 values, fitting ASCII plus extensions.

Open moment on YouTube ↗
#03
04 ▶ 10:13
What are Python's basic data types, and does Python's int have a maximum value?
Theory Data types, numbers & memory
?
Candidate's answer

Named int, float, str, and bool and contrasted Python with fixed-width C ints, but wavered under questioning and assumed Python ints must still have a hardcoded numeric ceiling.

Key takeaway

Python 3 ints have arbitrary precision backed by a dynamic digit array in PyLongObject, bounded only by available RAM.

Open moment on YouTube ↗
#04
05 ▶ 13:22
How are negative integers represented in memory?
Theory Data types, numbers & memory
?
Candidate's answer

Proposed using the leading bit as a sign flag: 0 for non-negative numbers and 1 for negative numbers.

Key takeaway

Hardware signed integers use two's complement arithmetic, while CPython's arbitrary-precision int stores magnitude digits separately from the sign metadata.

Open moment on YouTube ↗
#05
06 ▶ 14:44
What is the bool type, why is it named Boolean, and how does it work under the hood in Python?
Theory Data types, numbers & memory
?
Candidate's answer

Noted that Boolean is named after its inventor, has two values (True and False), and behaves like 1 and 0 under the hood.

Key takeaway

Named after George Boole, Python's bool subclasses int directly (issubclass(bool, int) is True), with True == 1 and False == 0.

Open moment on YouTube ↗
#06
07 ▶ 16:40
How does truthiness work in Python, and which objects evaluate to False?
Theory Control flow, loops & syntactic sugar
?
Candidate's answer

Initially got tangled up in an arithmetic example, then recovered to state that 0 and empty collections are falsy while non-zero numbers and non-empty collections are truthy.

Key takeaway

Falsy values in Python include None, False, numeric zeros (0, 0.0), empty sequences/mappings ('', [], {}, set()), and custom objects where __bool__() is False or __len__() is 0.

Open moment on YouTube ↗
#07
08 ▶ 22:15
How do you create empty built-in collections in Python?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Described calling collection constructors with no arguments, though he mistakenly remarked that an empty dict cannot easily be written as a literal.

Key takeaway

In Python, {} is the literal for an empty dict, whereas an empty set must be created via set().

Open moment on YouTube ↗
#08
09 ▶ 23:45
What is the difference between a data type and a data structure, and what are list and dict in Python?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Distinguished scalar values from multi-element containers and noted that everything in Python is a class, but got confused by type([]) and hesitated to call dict a data type.

Key takeaway

A data type (like class list or dict) defines the set of values and operations, while a data structure (dynamic array or hash table) is the concrete memory layout implementing it.

Open moment on YouTube ↗
#09
10 ▶ 27:17
What are a hash, a hash function, and a hashable object in Python, and how do you check hashability?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Correctly linked hashability to immutable dict keys, but inaccurately described a hash as a 'secret password string' and could not name built-in hash().

Key takeaway

In Python, hash(obj) (via __hash__) returns an integer that remains constant over the object's lifetime and satisfies a == b => hash(a) == hash(b).

Open moment on YouTube ↗
#10
11 ▶ 30:18
How are list and dict implemented under the hood in Python?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Briefly misspoke calling dict a dynamic list, then corrected himself: list uses a dynamic array of pointers while dict indexes key-value slots in a hash table via the key's hash.

Key takeaway

CPython's list is an over-allocated array of object pointers, while dict is an open-addressed compact hash table with O(1) average lookup and insertion-order preservation.

Open moment on YouTube ↗
#11
12 ▶ 35:59
Is result = 1; result -= -1; result += +1 valid Python, and what value does result get?
Live coding Data types, numbers & memory
?
Candidate's answer

Initially expected a syntax error on -= -1 and += +1, but once the snippet ran without crashing, correctly evaluated the unary signs to get result == 3.

Key takeaway

In result -= -1 and result += +1, augmented assignment (-= / +=) simply takes unary -1 and +1 as right-hand operands.

Open moment on YouTube ↗
#12
13 ▶ 38:24
What do built-in functions any() and all() do, and what arguments do they accept?
Live coding Modules, packages, imports & stdlib
?
Candidate's answer

Admitted he had not used any() or all() before, deducing only after seeing True on the first run that any() checks for at least one truthy item.

Key takeaway

any(iterable) short-circuits to True on the first truthy element (False if empty), while all(iterable) short-circuits to False on the first falsy element (True if empty).

Open moment on YouTube ↗
#13
14 ▶ 43:26
Why does print(any({'a': False, 'b': False, 'c': False})) print True when every dictionary value is False?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Predicted False assuming any(d) inspects dict values, and was stumped when it printed True.

Key takeaway

Iterating over a dict yields its keys rather than its values: non-empty key 'a' is truthy so any(d) returns True immediately; use any(d.values()) to test values.

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

A mock technical interview for a Junior Python developer position. The conversation covers number systems, bytes, Python data types, Boolean values, truthiness, data structures, hash tables, and a code-reading exercise involving dictionaries and any(). The video concludes with detailed feedback on the candidate’s strengths, uncertainties, and areas for further study.