Question Bank
Python interview questions
Working Python code does not by itself explain memory behavior, iteration or mutable objects. Use these questions to review language mechanisms. Support your answer with a small example and predict the result before running it.
Showing 20 of 114 questions
Explain how memory management works in Python, including reference counting and garbage collection.
What are metaclasses in Python, and how do they differ from regular classes?
Explain how descriptors work, including the __get__ and __set__ methods.
What are the differences between list comprehension and generator expression in Python?
How does the walrus operator work and in what cases should it be used?
Explain how generators work and what their advantages are over regular functions.
Compare dataclasses, NamedTuple, and attrs. What are their main differences and when should each be used?
Explain the concept of descriptors and how they implement the __get__ and __set__ interfaces.
What is MRO (Method Resolution Order) and how does C3 linearization work?
Explain the difference between decorators with arguments and without arguments.
How do descriptors work in Python and where can they be useful?
Explain how garbage collection works in Python and what reference counting is.
What are the advantages of using dataclasses over NamedTuple?
Prepare for your next interview with Vibe Interview.
Download Vibe Interview