Common interview questions with model answers, common mistakes and follow-ups.
/
Active filters: 2
50 results
What is the difference between is and == in Python?
JuniorVery commonpythonoperators
What is the difference between a regular method, a @classmethod and a @staticmethod?
JuniorVery commonpythonoop
Even with the GIL, a multithreaded Python service occasionally produces wrong totals. Why can race conditions still happen, and how do you prevent them?
SeniorCommonpythonconcurrency
How do Python dictionaries and sets work internally, and what kinds of objects can be used as keys?
JuniorVery commonpythondict
How do type hints work in Python, and how do you get real value from them in a project?
MiddleVery commonpythontyping
What do dataclasses give you, and when would you use a dataclass, a NamedTuple or a Pydantic model?
MiddleVery commonpythondataclasses
How does @property work, and what are descriptors in Python?
MiddleCommonpythondescriptors
Memory of a long-running Python worker grows steadily until it is killed. How do you investigate and fix it?
SeniorCommonpythonmemory-leaks
Which built-in Python types are mutable and which are immutable, and why does it matter when you pass them to a function?
JuniorVery commonpythonmutability
How do you choose between threading, multiprocessing and asyncio for a task in Python?
MiddleVery commonpythonconcurrency
Strings in Python are immutable. What does that mean in practice, and how should you build a long string from many parts?
JuniorCommonpythonstrings
How does functools.lru_cache work, and what should you watch out for when using it?
MiddleCommonpythoncaching
How would you structure a large Python backend so that business logic stays testable and independent of frameworks and infrastructure?
SeniorCommonpythonarchitecture
How do you design reliable background tasks with Celery or a similar queue, given that tasks can run twice or fail midway?
SeniorVery commonpythoncelery
What does __slots__ do, and when is it worth using?
MiddleCommonpythonmemory
A Python API endpoint has become slow in production. How do you find the cause and decide on a fix?
SeniorVery commonpythonperformance
What is the GIL in CPython, and how does it affect multithreaded programs?
MiddleVery commonpythongil
What are metaclasses in Python, and what simpler alternatives would you consider before using one?
SeniorCommonpythonmetaclasses
What is the difference between a list and a tuple in Python, and when would you use each?
JuniorVery commonpythondata-structures
How does Python resolve methods with multiple inheritance, and what does super() actually call?