← Back to videos

Mock interview with Anton for a Junior Python developer position

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Passed with caveats Level: Borderline Junior (strong code intuition, theoretical gaps)

Borderline outcome warranting a follow-up coding assignment: the candidate stumbled on roughly 55–60% of abstract theory questions (parameters vs arguments, nested namespaces, OOP abstraction vs abstract classes), yet solved both code-reading problems accurately without falling for trick pushback. In a real hiring loop, the interviewer would advance him to a practical coding test.

Candidate: Anton
Target role: Junior Python Developer

~5 years writing Python diagnostic scripts for data-exchange validation at his main job · graduated from Yandex Practicum's extended Python program in 2023 and builds web projects

Answers accuracy 12 total
67% score
Theory
3/10 correct · 60%
Live coding
2/2 correct · 100%
Practical task
Solved

Checking a 1-tuple with isinstance() and removing list items during iteration

The candidate solved both whiteboard code exercises: he immediately caught the trailing comma in value = (1_000_000,) and stood by False for isinstance(value, int), then accurately traced index shifting in numbers.remove(i) inside a for-loop and proposed building a new filtered list.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Confident code reading: spotted the 1-tuple trailing comma and explained index shifting during in-place list removal
  • + Resilience against misleading follow-ups on topics backed by hands-on coding experience
  • + Clear explanation of object references (a = 5), classes vs instances, and syntactic indentation blocks
  • + Ability to pause and acknowledge theoretical gaps instead of digging deeper

Areas to improve

  • → Clarify core function terminology (parameters vs arguments and LEGB visibility between outer and inner functions)
  • → Study software design patterns, when to choose OOP over procedural modules, and abstraction vs abstract base classes
  • → Distinguish parser syntax errors (TabError when mixing tabs and spaces) from PEP 8 linter warnings
  • → Sharpen conceptual boundaries between data types, classes, instances, and data structures

Questions in this interview

12 / 12
01 ▶ 05:54
What is the difference between function parameters and arguments in Python?
Theory Functions, scopes & closures
?
Candidate's answer

Due to early nerves, drifted into object-reference mechanics and mistakenly guessed that parameters mean keyword arguments while arguments mean positional ones.

Key takeaway

Parameters are the variable names listed in a def signature, whereas arguments (both positional and keyword) are the values supplied at the call site.

Open moment on YouTube ↗
#01
02 ▶ 10:30
Why can't main program code read a variable defined inside a function, and can global state be accessed?
Theory Functions, scopes & closures
?
Candidate's answer

Explained local vs global scope isolation: local variables exist only inside the function execution frame unless explicitly linked to module globals via global.

Key takeaway

A function's local frame lives only for the duration of the call; pass results outward cleanly via return rather than mutating globals.

Open moment on YouTube ↗
#02
03 ▶ 14:10
How does a namespace differ from a scope, and can an outer function access variables of an inner nested function?
Theory Functions, scopes & closures
?
Candidate's answer

Rightly placed variable bindings inside module/function namespaces governed by scope visibility, but got tripped up and wrongly agreed that an outer function can read an inner function's locals.

Key takeaway

Nested scope visibility is strictly one-way (LEGB): an inner function can read enclosing outer variables, but the outer function cannot see inner locals.

Open moment on YouTube ↗
#03
04 ▶ 20:18
Are indentations in Python purely for readability or required by the language itself?
Theory Control flow, loops & syntactic sugar
?
Candidate's answer

Accurately stated that indentation defines syntactic block membership for if statements, loops, functions, and classes rather than being mere visual formatting.

Key takeaway

Unlike brace-delimited languages, Python's lexer emits syntactic INDENT and DEDENT tokens directly from leading whitespace.

Open moment on YouTube ↗
#04
05 ▶ 22:14
What is PEP 8, does a 2-space indent work, and what happens if you mix tabs and spaces?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Defined PEP 8 as Python's style guide recommending 4 spaces and noted consistent 2-space indents run fine, but thought mixing tabs and spaces only triggers linter warnings.

Key takeaway

Using 2 spaces only violates PEP 8 style guidelines, whereas mixing literal tabs and spaces within a block raises a hard TabError in Python 3.

Open moment on YouTube ↗
#05
06 ▶ 27:27
What will print(isinstance(value, int)) output when value = (1_000_000,)?
Live coding OOP, classes & dunder methods
?
Candidate's answer

Immediately spotted the trailing comma creating a tuple, briefly double-checked under interviewer pushback, and firmly confirmed the output is False.

Key takeaway

A trailing comma defines a singleton tuple literal (x,), so isinstance((1_000_000,), int) evaluates to False.

Open moment on YouTube ↗
#06
07 ▶ 30:14
What does for i in numbers: if i < 5: numbers.remove(i) try to do, why does it fail, and how would you fix it?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Once reminded .remove() deletes by value, accurately traced how removing 1 shifts 2 into index 0 so the loop skips straight to 5, and proposed collecting items >= 5 into a new list.

Key takeaway

list.remove(x) deletes the first matching value and shifts trailing elements left; filter safely by constructing a new list via [x for x in numbers if x >= 5].

Open moment on YouTube ↗
#07
08 ▶ 36:51
What is None in Python and how is it used in practice?
Theory Data types, numbers & memory
?
Candidate's answer

Described None as a distinct 'empty' sentinel (different from 0) used to check whether a variable has been assigned a meaningful value, though loosely called None itself a data type.

Key takeaway

None is the sole singleton instance of NoneType, returned implicitly by functions without a return value and used as Python's null sentinel.

Open moment on YouTube ↗
#08
09 ▶ 38:11
What are an object and a class in Python, and how do they relate when executing a = 5?
Theory OOP, classes & dunder methods
?
Candidate's answer

Clearly explained that 5 is an int instance allocated in memory, 'a' holds a reference to it, and contrasted a class (abstract blueprint) with an instance (concrete object).

Key takeaway

Every runtime value in Python is an instance of a class (type(5) is int), and variables store references pointing to those objects.

Open moment on YouTube ↗
#09
10 ▶ 43:49
When designing a program, how do you know custom classes are better than functions organized into modules?
Theory OOP, classes & dunder methods
?
Candidate's answer

Pointed to structuring large codebases around real-world domain entities, then honestly paused when pressed for a concrete technical advantage over modular functions.

Key takeaway

Stateless functions in modules suit data pipelines well, whereas classes are needed when managing multiple stateful instances, invariants, and polymorphic interfaces.

Open moment on YouTube ↗
#10
11 ▶ 47:15
What are the core OOP principles, and is OOP abstraction the same thing as abstract classes?
Theory OOP, classes & dunder methods
?
Candidate's answer

Named inheritance, encapsulation, polymorphism, and abstraction as essential to effective OOP, but mistakenly equated the principle of abstraction with abstract classes.

Key takeaway

Abstraction is the general design principle of exposing essential behavior while hiding irrelevant details; an abstract base class (abc.ABC) is just one specific tool to enforce interfaces.

Open moment on YouTube ↗
#11
12 ▶ 53:31
How does a 'data type' differ from a 'data structure' in Python — why is list both while int is a data type?
Theory Data types, numbers & memory
?
Candidate's answer

Accurately distinguished atomic int values from container structures like list and dict that organize references to multiple objects, though got tangled debating whether a data structure is a class or an instance.

Key takeaway

A data structure is an algorithmic memory layout for organizing elements (dynamic array, hash table), implemented in Python as container classes like list, dict, and set.

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

Anton has already had experience writing program code, for example for automating the search for errors in information exchange. Some time ago Anton saw a digital economy program, went to study and master a new area of programming. Started doing web projects. This area appealed to him more than developing specialized interfaces. And now Anton is trying his hand at a mock interview for the position of Junior Python developer.

On this channel I conduct mock interviews for the role of Python developer for anyone interested. This is a great opportunity to prepare for a real interview, improve your skills, get useful tips and honest feedback. I do all of this absolutely for free. However, maintaining quality requires significant time and resources. If you like my content and want to support the channel, I'll be grateful for any financial support.

https://www.tbank.ru/cf/4PYyn4udS41