Python's readable syntax is its greatest strength and its greatest trap. The language is easy enough to pick up that developers often plateau early — writing code that works, but without understanding the mechanisms underneath. That plateau is exactly where interview questions live.
Senior Python interviewers are not interested in whether you can write a function or iterate over a list. They want to know whether you understand Python's memory model, whether you know what a decorator is and how to write one, whether you've thought about the GIL and what it means for concurrency. These are the questions that separate script writers from engineers.
The ten questions below are drawn from the same pool that senior Python interviews at product companies draw from. They cover the concepts that matter in production Python codebases.
What senior Python knowledge looks like
Decorators are one of Python's most powerful and most misunderstood features. A decorator is a function that takes a function as an argument and returns a modified version of it. They are used for logging, authentication, caching, rate limiting, and dozens of other cross-cutting concerns. Understanding how to write a decorator — not just use @app.route or @property — means understanding higher-order functions and closures in Python.
Generators are the mechanism Python uses for lazy evaluation. A generator function uses yield instead of return and produces values one at a time rather than building an entire sequence in memory. They're critical for processing large datasets, implementing pipelines, and building memory-efficient iterators. Understanding when to use a generator comprehension versus a list comprehension is a signal of Python engineering maturity.
Python's memory model is reference-counting based. Everything in Python is an object. Variables are references to objects, not boxes containing values. This explains why mutable default arguments are a notorious gotcha — the mutable object is created once when the function is defined, not fresh on every call. The GIL (Global Interpreter Lock) is the other memory-model concept worth understanding: it prevents true parallel execution of Python bytecode in CPython, which has significant implications for CPU-bound concurrent workloads.
__slots__ is a class-level optimisation that pre-declares which attributes instances will have, bypassing the default __dict__ and reducing memory consumption significantly for objects created in large quantities. Knowing when to reach for __slots__ signals an understanding of Python's object model at the implementation level.
10 questions that test real Python knowledge
Work through these before looking up anything. Your honest score is more useful than a coached one.
1. What is wrong with this function definition: def append_to(element, to=[]): to.append(element); return to? What happens when you call it twice with no second argument?
2. What is the difference between a list comprehension and a generator expression? When should you prefer the generator?
3. The GIL prevents true parallel execution of Python threads for CPU-bound tasks. What is the recommended alternative for CPU-bound parallelism in Python?
4. Write a decorator called 'retry' that wraps a function and retries it up to 3 times if it raises an exception, with a 1-second delay between retries.
5. What are __slots__ and why would you use them? What can you no longer do on a class that uses __slots__?
6. What is the difference between *args and **kwargs? Write a function that accepts any combination of positional and keyword arguments and prints them.
7. What is a context manager? Implement one using the __enter__ and __exit__ protocol that measures and prints the execution time of any with block.
8. What is duck typing and how does it differ from static typing? Give an example where duck typing is advantageous.
9. What is the difference between 'is' and '==' in Python? In what situation would 'a is b' be True but 'a == b' still be misleading?
10. What is the difference between __new__ and __init__? When would you override __new__?
Why these questions matter for interviews
Python interviews at strong engineering organisations are not testing whether you can write a loop or call a library. They're testing whether you understand the language well enough to use it correctly under pressure — to debug a production issue, to review someone else's code for subtle bugs, to make an architectural decision about concurrency.
The mutable default argument question (question 1) is famous precisely because it's a bug that catches developers who understand Python's syntax but haven't thought about its memory model. The decorator question tests whether you understand that functions are first-class objects and closures work the way they do. The GIL question tests whether you've ever actually thought about Python concurrency rather than just reaching for threading.Thread.
These questions distinguish developers who can get Python code to run from developers who can reason about what Python code will do in a production system over time. That's the distinction interviewers are drawing.
What your Python score means
The Skeelzy Python quiz covers the language fundamentals that backend Python interviews actually test: data structures, generators, decorators, the memory model, concurrency patterns, and common standard library usage. It adapts to your performance — harder questions appear as your accuracy improves.
A score above 80% indicates solid Python engineering knowledge: you understand the language deeply enough to write production-quality Python and debug issues that involve the runtime, not just the logic. A score between 60-80% suggests practical Python skill with gaps in the more advanced language features. Below 60% typically indicates Python is still primarily a scripting tool for you rather than a language you've engineered with.
Your verified Python score appears on your Skeelzy resume as a badge that tells recruiters something specific: not that you claim to know Python, but that you were tested on it and here's what you scored. In a field where Python appears on nearly every backend and data engineering resume, that specificity matters.