← Back to videos

Public mock interview with Dmitry for a Junior Python developer position

Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Needs more practice Level: Pre-Junior / Junior- (solo practitioner with fundamental gaps)

The candidate fell slightly short: despite real solo development experience and great communication energy, his foundational Python knowledge is fragmented—stumbling on first-class classes/modules, constant conventions, starred unpacking, list.extend(), and the purpose of if __name__ == '__main__'.

Candidate: Dmitry
Target role: Junior Python Backend

2 years as a solo fullstack developer (React + Python/Django, Docker, requirements gathering) · seeking his first team engineering role

Answers accuracy 15 total
37% score
Theory
2/11 correct · 41%
Live coding
1/4 correct · 25%
Practical task
Partially solved

Starred string unpacking (*_, = 'Junior') and list append vs extend

The candidate initially intuited splitting 'Junior' into a character list and accurately predicted _.append('test'), but talked himself into predicting a crash on *_, = 'Junior'. He also assumed the trailing comma did nothing (removing it raises SyntaxError) and mistook _.extend('test') for deleting elements from the end of the list.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Lively communication, composure, and resilience without freezing when stumped
  • + Practical fullstack background and high-level familiarity with common development concepts
  • + Sensible instincts on readable variable naming and avoiding shadowing built-in names in team code
  • + Correctly traced list.append() behavior and referencing function objects without calling them

Areas to improve

  • → Study structured Python fundamentals and PEP 8 end-to-end to close self-taught knowledge gaps
  • → Understand Python's first-class object model (assigning classes, functions, and modules to variables) and constant conventions
  • → Practice starred iterable unpacking (*target,), list methods (.append vs .extend), and if __name__ == '__main__'
  • → Ground arguments in verified language mechanics instead of flip-flopping when challenged by the interviewer

Questions in this interview

15 / 15
01 ▶ 04:18
What is a variable in Python and how does it reference data in memory?
Theory Data types, numbers & memory
?
Candidate's answer

Initially described a variable as a memory cell or buffer holding data, then refined his answer with prompting to say a variable stores a reference to an object in memory.

Key takeaway

In Python, a variable is a name bound to a heap-allocated PyObject reference rather than a typed memory box.

Open moment on YouTube ↗
#01
02 ▶ 07:45
What built-in data types exist in Python, and does None have its own type?
Theory Data types, numbers & memory
?
Candidate's answer

Listed int, float, lists, tuples, dicts, and bool, and mentioned None as emptiness while unsure whether None is a data type.

Key takeaway

None is the sole singleton instance of built-in NoneType, representing the absence of a value.

Open moment on YouTube ↗
#02
03 ▶ 11:16
What are data structures and how do they relate to data types and classes in Python?
Theory Collections, lists, dicts & hash tables
?
Candidate's answer

Defined a data structure as how data is organized and noted custom ones can be built with classes, though struggled to separate types from structures cleanly.

Key takeaway

A data structure defines memory layout and operation complexity (e.g., hash table, dynamic array), while built-in types like dict and list implement them.

Open moment on YouTube ↗
#03
04 ▶ 14:35
Can you assign a class itself to a variable in Python without instantiating it?
Theory OOP, classes & dunder methods
?
Candidate's answer

Answered no, assuming referencing a class requires passing arguments to __init__ to create an instance.

Key takeaway

Classes are first-class objects in Python: cls = MyClass binds the class itself without calling __init__, enabling factories and registries.

Open moment on YouTube ↗
#04
05 ▶ 15:52
Can you assign a function to a variable without calling it?
Theory Functions, scopes & closures
?
Candidate's answer

Confirmed yes, recalling that passing a function name without parentheses to print outputs a reference to the function object.

Key takeaway

Functions are first-class objects that can be assigned to variables, stored in dicts, passed as callbacks, and returned from decorators.

Open moment on YouTube ↗
#05
06 ▶ 17:30
Can an imported Python module be assigned to a variable?
Theory Modules, packages, imports & stdlib
?
Candidate's answer

Answered no since he had never done it and could not picture how a module would be bound to a variable.

Key takeaway

Every imported module is an instance of types.ModuleType; 'import math' or 'm = math' simply binds a variable name to that module object.

Open moment on YouTube ↗
#06
07 ▶ 18:29
What is a constant, and does assigning an immutable tuple make a Python variable constant?
Theory Data types, numbers & memory
?
Candidate's answer

Initially suggested assigning an immutable tuple, then realized the variable name itself can still be rebound to a completely new value.

Key takeaway

Object immutability prevents mutating the object's state, whereas constantness restricts rebinding a variable name—which Python does not enforce at runtime.

Open moment on YouTube ↗
#07
08 ▶ 21:20
How are constants declared in Python code if the runtime does not prevent variable reassignment?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Suggested external config files or writing a '# do not touch' comment next to the variable, missing Python's naming and typing conventions.

Key takeaway

By PEP 8 convention, module constants use UPPER_SNAKE_CASE, optionally reinforced for static type checkers with typing.Final.

Open moment on YouTube ↗
#08
09 ▶ 23:59
Will '*_, = "Junior"; print(_)' run without error, and what will it output?
Live coding Control flow, loops & syntactic sugar
?
Candidate's answer

Briefly intuited a list of characters from 'Junior', then doubted the star, underscore, and comma and changed his final prediction to a syntax crash.

Key takeaway

'*_, = "Junior"' performs starred iterable unpacking (PEP 3132) into a 1-tuple target, packing all characters of 'Junior' into a list bound to '_'.

Open moment on YouTube ↗
#09
10 ▶ 31:41
What role does the comma play in '*_, = "Junior"', and will '*_ = "Junior"' work without it?
Live coding Control flow, loops & syntactic sugar
?
Candidate's answer

Assumed the comma was an optional trailing comma ignored by Python and predicted removing it would still work.

Key takeaway

A starred assignment target is only valid inside a tuple or list target; the trailing comma forms that 1-tuple, and omitting it raises SyntaxError.

Open moment on YouTube ↗
#10
11 ▶ 35:54
What does _.append('test') produce on the character list ['J', 'u', 'n', 'i', 'o', 'r']?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Accurately predicted that 'test' is appended as a single string element at the end of the list.

Key takeaway

list.append(x) always adds x as a single element at the end of the list in amortized O(1) time, even when x is itself an iterable.

Open moment on YouTube ↗
#11
12 ▶ 36:55
What does _.extend('test') do on a list, and how does it differ from .append('test')?
Live coding Collections, lists, dicts & hash tables
?
Candidate's answer

Confused extend with pop() (removing from the end without arguments), then guessed _.extend('test') removes 'test', before seeing it append individual characters.

Key takeaway

list.extend(iterable) iterates over its argument and appends each yielded item individually—turning 'test' into four separate character elements.

Open moment on YouTube ↗
#12
13 ▶ 40:18
Where and why are single and double underscores used in Python?
Theory OOP, classes & dunder methods
?
Candidate's answer

Named class dunder methods (__init__, __del__) and __name__ == '__main__', but forgot single leading underscore (_protected) and throwaway '_' conventions.

Key takeaway

Underscore patterns cover throwaway variables (_), internal attributes (_name), class name mangling (__name), system dunders (__init__), and numeric separators (1_000).

Open moment on YouTube ↗
#13
14 ▶ 41:27
What syntax rules and conventions govern variable names in Python, and what happens if you name a variable list or str?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Separated parser syntax rules (forbidding #, %) from PEP 8 style guidelines, clarifying that naming a variable list or str is syntactically allowed but bad practice.

Key takeaway

Identifiers cannot start with digits or match keywords, while naming variables list or str shadows built-ins in that scope and breaks subsequent list()/str() calls.

Open moment on YouTube ↗
#14
15 ▶ 44:56
Why do Python files use the 'if __name__ == "__main__":' guard?
Theory Modules, packages, imports & stdlib
?
Candidate's answer

Could not explain module import behavior and joked that he only wrote it so his IDE would display a green Run button in the gutter.

Key takeaway

Python sets __name__ to '__main__' when executing a file directly, but to the module's name when imported—preventing top-level script code from running on import.

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

In this episode Dmitry is taking a mock interview for a Junior Python developer position.
Yes, Dmitry fell just short, but it turned out to be a great interview — with honest feedback and concrete steps on how to close gaps. There will also be some "magic" with asterisks *, underscore _ variable and list methods.

We discuss:
— understanding how to answer basic questions without "academic" tone;
— analyzing variables, types and data structures "on our fingers";
— why we need if __name__ == "__main__":;
— where to look for naming rules and how not to get confused in terminology;
— honest feedback from the interviewer and a plan on how to close gaps.

For whom the video is for
— Juniors and job seekers preparing for their first Python interview
— Middles who mentor and want to see how an interview goes
— Everyone who values not "correct memorized" answers but understanding and reasoning

If the video was helpful — like, write which topics to address in the next interview, and subscribe so you don't miss new analysis.

#python #python #interview #junior #interview #codeanalysis #programming #pep8 #learnpython