The candidate did not yet meet the Junior bar: core Python concepts are covered only at a surface level, leading to contradictions on follow-up questions around iterators, generators, __new__ vs __init__, and interfaces. With 2–3 months of focused work on Python fundamentals before diving deeper into FastAPI, he has a clear path forward.
Candidate:Sunnat
Target role:Junior Python Backend
1st-year Software Engineering student · studied Python basics and OOP, currently learning FastAPI, no commercial experience yet
Answers accuracy
13
total
35%
score
Theory
1/10 correct · 35%
Live coding
0/3 correct · 33%
Practical task
Partially solved
Overriding __new__ in a class: why type(WTF()) evaluates to int
Before running the code, the candidate predicted type WTF because he hadn't used __new__. After seeing <class 'int'>, he rightly deduced that __new__(cls) ran automatically on WTF() and returned 42, but could not explain __new__'s true role as allocator/constructor versus __init__.
Topics covered
Click a topic to filter questions
Candidate strengths
+Calm demeanor: pauses to think before speaking and keeps dialogue moving without freezing up
+Baseline familiarity with core Python entities (__iter__/__next__, base object class, type())
+Receptive attitude toward probing questions and constructive feedback on knowledge gaps
Areas to improve
→Master Python's object creation lifecycle: constructor __new__(cls) vs initializer __init__(self)
→Clearly distinguish iterables, iterators, lazy generators (yield / generator expressions), and list comprehensions
What is Python's garbage collector, and how does it know which objects are 'garbage'?
Theory·Python internals, bytecode & runtime
Partial
?
Candidate's answer
Correctly contrasted Python's automatic memory management with manual allocation in C, but vaguely described garbage as 'unused cached data' without mentioning references.
Key takeaway
CPython reclaims memory primarily via immediate reference counting (refcount == 0), backed by a generational cyclic garbage collector (gc) that breaks unreachable reference cycles.
Correctly linked element traversal to __iter__ and __next__, but confused an iterator with a user-written function and later with the for-loop construct itself.
Key takeaway
An iterable implements __iter__() to produce an iterator object; the iterator tracks traversal state, yields items via __next__(), and raises StopIteration when exhausted.
Why are dunder methods called 'magic' methods in Python, and how do they differ from regular methods?
Theory·OOP, classes & dunder methods
Partial
?
Candidate's answer
Identified the double-underscore (dunder) naming convention, but could not explain their behavioral difference from regular methods.
Key takeaway
Dunder methods are invoked implicitly by the Python runtime for built-in syntax and protocols (+, len(), for, with), rather than being called directly by name.
Said he hadn't encountered built-in iter() and next(), and mistakenly agreed that merely declaring empty __iter__ and __next__ methods makes a class iterable.
Key takeaway
Built-ins iter(obj) and next(it) drive the iterator protocol; __iter__ must return an iterator object and __next__ must return the next value or raise StopIteration.
What is the base 'object' class, is it an object itself, and what does type(object) return?
Theory·OOP, classes & dunder methods
Partial
?
Candidate's answer
Correctly noted all classes inherit from 'object', everything in Python is an object, and type() inspects an object's class, but didn't know what class 'object' itself is an instance of.
Key takeaway
In Python's object model, 'object' is the root base class and 'type' is the root metaclass: type(object) is type, while type itself subclasses object.
How do you instantiate an object from a class in Python, and are there other ways?
Theory·OOP, classes & dunder methods
Partial
?
Candidate's answer
Described standard instantiation by calling the class name (slightly misstating the 'class' keyword), and knew no alternative instantiation mechanisms.
Key takeaway
Besides calling MyClass(), instances can be created via @classmethod factories (e.g., datetime.fromisoformat), copy/deepcopy, deserialization, or cls.__new__(cls).
Equated generators with compact one-line syntax for populating lists, missing lazy evaluation and yield, and said he hadn't used the term list comprehension.
Key takeaway
Generators (functions using yield or (x for x in ...)) produce items lazily on demand in O(1) memory, unlike list comprehensions [x for x in ...] that materialize all elements in RAM.
Is __init__ a constructor or an initializer, and what does the __new__ dunder method do?
Theory·OOP, classes & dunder methods
Incorrect
?
Candidate's answer
Called __init__ the class constructor for setting initial attributes and admitted he had never encountered __new__.
Key takeaway
__new__(cls, ...) is the actual constructor that allocates and returns the new instance, whereas __init__(self, ...) initializes attributes on an already-created object.
What is a class interface, and how does a regular base class differ from an abstract class?
Theory·OOP, classes & dunder methods
Incorrect
?
Candidate's answer
Defined an interface as 'shared similarities among objects' (conflating it with inherited fields even after an ATM analogy) and couldn't distinguish a concrete base class from an abstract one.
Key takeaway
An interface defines external callable operations; a concrete base class can be instantiated directly, while an abstract class (abc.ABC + @abstractmethod) cannot be instantiated until subclasses implement its abstract methods.
Why did type(a) print <class 'int'>, and is __new__ called even on normal classes that don't define it?
Live coding·OOP, classes & dunder methods
Partial
?
Candidate's answer
After seeing the output, deduced that __new__ ran automatically on instantiation and returned 42, and guessed __new__ runs by default too, though he misattributed attribute initialization to it.
Key takeaway
Every instantiation calls inherited object.__new__(cls) to allocate a blank instance first; Python only invokes __init__(self, ...) if __new__ returns an instance of cls.
What is the Zen of Python, and why does Python allow overriding __new__ despite 'Explicit is better than implicit'?
Live coding·Algorithms, code reading & engineering practices
Partial
?
Candidate's answer
Described the Zen of Python as guiding philosophy (quoting 'Beautiful is better than ugly'), but couldn't name practical engineering use cases for __new__.
Key takeaway
__new__ serves real practical needs ('Practicality beats purity'): subclassing immutable types (int, str, tuple), implementing Singletons/object caches, and custom metaclasses.
A live mock interview for a Junior Python Developer position with detailed feedback at the end. The conversation begins with a brief introduction, after which the candidate answers questions on fundamental Python topics: garbage collection, iterators, generators, magic methods, object creation, __init__, __new__, classes, objects, base and abstract classes, as well as interfaces and OOP in general.
Throughout the interview, it becomes clear that not only theoretical knowledge is being assessed, but also depth of understanding, reasoning skills, the ability to handle unconventional questions, and to calmly respond to the interviewer’s clarifications. In the end, the candidate’s strengths and weaknesses are reviewed, common gaps among beginner developers are discussed, and recommendations are given on what to focus on in learning in order to perform more confidently in real interviews.
This video will be useful for those preparing for a Junior Python Developer interview, studying Python, and wanting to better understand what questions might come up, how to answer them, and which knowledge is truly important for starting a career. It’s not just interview practice, but also a great opportunity to identify your own gaps, deepen your understanding of Python fundamentals, and figure out what direction to move in next.
Timestamps:
00:00 Start 00:11 Mock interview for Junior Python Developer 01:05 Candidate self-introduction 01:42 Interview format overview 03:20 Garbage collector in Python explained simply 06:09 Iterators, iteration, and iterable objects 14:28 Why magic methods are called “magic” 16:04 Are there iter() and next() functions in Python 16:44 How to implement an iterable object 19:11 The object class, base classes, and the nature of objects 21:43 How to create an object from a class 23:28 Generators in Python: what they are 27:24 How a generator differs from a loop 30:01 __init__: constructor or initializer 31:06 __new__ in Python: what kind of magic method it is 39:05 Practical task: why type(a) became int 45:08 The Zen of Python vs “magic” 52:30 Candidate self-assessment after the interview 54:13 Feedback: weaknesses and growth areas 01:06:14 Interview verdict 01:07:51 Why beginners need mock interviews