← Back to videos

Mock interview with Kostya for a Junior Python developer position

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Needs more practice Level: Intern / Trainee

The candidate did not yet meet the autonomous Junior bar, though the interviewer confirmed his foundation is solid enough for an Intern role: he explained mutability in memory, iterables, and Git workflows well, but mixed up linked-list complexity and missed classic Python pitfalls during code reading.

Candidate: Kostya
Target role: Junior Python Developer

Career switcher with no prior IT background · graduated from Yandex Practicum's Python track, building a team project in Practicum Workshop and exploring Discord API

Answers accuracy 12 total
54% score
Theory
3/8 correct · 62%
Live coding
1/4 correct · 38%
Practical task
Not solved

1-tuple isinstance() check, removing list items in a loop, and mutable default argument

Across three code snippets, the candidate predicted False on isinstance((1_000_000,), int) and traced a single default-argument call, but attributed tuple creation to parentheses instead of the comma and could not explain either skipped elements in numbers.remove(i) or state retention in def add_item(item, my_list=[]).

Topics covered Click a topic to filter questions

Candidate strengths

  • + Clear explanation of mutable vs immutable types in terms of references, heap objects, and object identity
  • + Practical understanding of Git version history, remote repositories, and merge-conflict detection in teams
  • + Genuine reasoning in his own words without memorized clichés, paired with accurate self-assessment
  • + Correct distinction between a variable name (reference) and the underlying Python object

Areas to improve

  • → Review core data structures and complexity: why singly linked lists lack O(1) indexing compared to dynamic arrays
  • → Master classic Python gotchas: mutating lists while iterating, mutable default parameters (my_list=[]), and 1-tuple syntax (x,)
  • → Practice concrete use cases for lambda callbacks and recursion (e.g., nested data or tree traversal)
  • → Develop the habit of asking 'why and when to choose X over Y' rather than just following step-by-step recipes

Questions in this interview

12 / 12
01 ▶ 03:14
What is an array as a data structure, and how does it differ from Python's built-in list?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Initially equated list with an array and hesitated on mixed types, then self-corrected: Python lists hold heterogeneous objects while classic arrays store same-type elements with index access.

Key takeaway

CPython's list is a dynamic array of PyObject pointers supporting mixed types, whereas homogeneous typed arrays live in array.array or NumPy.

Open moment on YouTube ↗
#01
02 ▶ 10:26
How do singly and doubly linked lists work, and which has faster index lookup — a dynamic list or a singly linked list?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Recalled next-node pointers and forward-only traversal in singly linked lists, but mistakenly claimed nodes must share one type and that index lookup is faster than in an array-backed list.

Key takeaway

Singly linked lists have no direct index arithmetic — reaching index k requires O(n) pointer hops from the head, whereas Python's list indexes in O(1).

Open moment on YouTube ↗
#02
03 ▶ 17:21
What are lambda functions in Python, why are they needed, and how does built-in map() work?
Theory Functions, scopes & closures
?
Candidate's answer

Defined lambda as an unnamed function and accurately explained map(func, iterable) applying a function across items, but couldn't articulate why lambdas exist alongside def.

Key takeaway

Lambdas let you pass concise single-expression callbacks inline to higher-order functions like map(), filter(), or sorted(key=...) without polluting the namespace.

Open moment on YouTube ↗
#03
04 ▶ 20:18
What is an iterable object in Python, and which built-in types are iterable?
Theory Decorators, iterators, generators & context managers
?
Candidate's answer

Explained that an iterable can be traversed element by element in a loop, correctly listing list, str, tuple, and dict.

Key takeaway

An object is iterable if it implements __iter__() (or 0-based __getitem__), covering all built-in collections, strings, range, file streams, and generators.

Open moment on YouTube ↗
#04
05 ▶ 21:52
What do mutability and immutability mean in terms of variable references and objects in memory?
Theory Data types, numbers & memory
?
Candidate's answer

Clearly explained that variables hold object references: mutating a list updates its contents under the same id, while rebinding an immutable tuple creates a new object in memory.

Key takeaway

Mutable objects (list, dict, set) allow in-place state changes at the same id(obj), whereas operations on immutable types (int, str, tuple) always allocate new objects.

Open moment on YouTube ↗
#05
06 ▶ 24:20
What is an object in Python, what is NOT an object, and how are objects related to classes?
Theory OOP, classes & dunder methods
?
Candidate's answer

Correctly noted ints and functions are heap objects with types and reference counts while variable names themselves are not objects, and linked objects to classes, though froze on defining a class.

Key takeaway

Variable names and keywords are syntactic bindings rather than objects, while a class is the blueprint and factory defining the attributes and methods of its instances.

Open moment on YouTube ↗
#06
07 ▶ 29:16
What does print(isinstance(value, int)) print for value = (1_000_000,), and what makes value a tuple?
Live coding OOP, classes & dunder methods
?
Candidate's answer

Correctly identified value as a tuple and predicted False, but mistakenly claimed wrapping any value in parentheses creates a tuple, missing the trailing comma.

Key takeaway

Parentheses without a comma (1_000_000) merely group an expression and evaluate to int; only the trailing comma (1_000_000,) constructs a 1-element tuple.

Open moment on YouTube ↗
#07
08 ▶ 31:44
What list does for i in numbers: if i < 5: numbers.remove(i) produce, and why isn't 2 removed?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Predicted every number below 5 would be removed, and even when tracing step by step after running the code, could not figure out why 2 was skipped.

Key takeaway

Removing index 0 shifts element 2 left into index 0 while the list iterator advances to index 1, skipping element 2 completely.

Open moment on YouTube ↗
#08
09 ▶ 35:40
How does def add_item(item, my_list=[]) execute on a single call add_item(1) with one argument?
Live coding Functions, scopes & closures
?
Candidate's answer

Accurately broke down the signature and step-by-step execution: since the second parameter is optional, omitting it uses the default list, appends 1, and returns [1].

Key takeaway

Default parameter values make arguments optional at the call site when no explicit value is passed.

Open moment on YouTube ↗
#09
10 ▶ 40:45
What will two consecutive calls add_item(1) and add_item(2) print when the list argument is omitted, and why?
Live coding Functions, scopes & closures
?
Candidate's answer

Sensed a catch intuitively, wavering between [2] and an empty list, and after seeing [1, 2] could not explain why separate calls shared the same list.

Key takeaway

The default [] is allocated once when def executes and stored on func.__defaults__, so every call omitting my_list mutates that same shared list.

Open moment on YouTube ↗
#10
11 ▶ 44:47
What is recursion, what kinds of problems suit it, and how does it compare to its alternative?
Theory Functions, scopes & closures
?
Candidate's answer

Described self-calling functions, base cases, nested-box unpacking, and the trade-off vs loops (cleaner nested logic at higher call-stack memory cost), though struggled to name concrete engineering tasks.

Key takeaway

Recursion naturally expresses tree, directory, AST, and nested-JSON traversals; any recursion can be rewritten iteratively with an explicit stack to avoid Python's RecursionError limit.

Open moment on YouTube ↗
#11
12 ▶ 52:20
What is Git, and why is Git + GitHub better than manually numbering project folders and emailing files?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Explained that Git tracks version history for instant rollbacks and syncs branches with remote repos like GitHub, enabling parallel team development and automatic merge-conflict detection.

Key takeaway

Git maintains a local commit graph, supports isolated feature branches, powers Pull Request code reviews, and safely merges concurrent edits across a team.

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

Kostya didn't pass the interview, but the conversation was very interesting.

Actually Kostya is enthusiastic about development and process automation in Python. He likes to learn new technologies, constantly improving his skills, studying technical documentation.

Currently Kostya is self-studying Discord API documentation for his own project, and in the future plans to learn Flask to work with simpler applications.