Python Developer Interview Questions | Kore BPO
Nearshore Hiring

Python Developer Interview Questions: What to Ask at Each Stage

August 14, 2026
10 min read
Last updated: August 14, 2026
Engineering manager conducting structured technical Python developer interview via video call
Quick Answer
What are the best Python developer interview questions?
The most predictive Python developer interview questions test language fundamentals like generators, decorators, and the GIL alongside framework depth in Django, FastAPI, or Flask. For nearshore roles, pair those technical stages with an async written communication evaluation that reflects how the developer actually works day to day.
Asking a candidate to explain decorators with a real codebase example quickly separates surface-level knowledge from hands-on experience
Framework questions should match the stack you’re hiring for: Django ORM depth differs significantly from FastAPI async patterns
A 24-hour written async test is more predictive for nearshore roles than adding a fifth video interview round
See screened Python talent at korebpo.com/nearshore-python-developers/

Last updated: August 14, 2026

Most Python developer interviews run on autopilot. The interviewer asks the candidate to reverse a linked list, checks whether they know what a list comprehension is, and calls it done. The problem is those questions don’t predict whether someone will ship maintainable Django views, write testable FastAPI services, or communicate effectively across a time zone gap.

The questions below are organized by interview stage and weighted toward what actually predicts performance on a modern Python backend team. For nearshore hiring specifically, there is a dedicated section on evaluating async communication and real-time English, since those are often what determine whether a remote Python hire integrates well or stays siloed.


Before the Interview: What to Assess

Before you schedule a first screen, decide what you are actually trying to measure. Python developers exist across a wide range of roles. A data engineer using Python for pipeline orchestration is not the same hire as a backend web developer building Django REST APIs. Three dimensions matter most regardless of specialization:

Python knowledge depth. There is a meaningful gap between developers who use Python as a scripting layer and developers who understand how the language actually works. Generators, context managers, the GIL, and memory management are not advanced topics in 2026. They are baseline expectations for any mid-senior backend hire. Set your minimum bar here before the first call.

Async and OOP understanding. Modern Python backend development leans heavily on async patterns, especially with FastAPI and the broader shift toward event-driven architectures. A developer who has only written synchronous Django views and never touched asyncio will need significant ramp time on any async codebase. OOP fluency matters too, particularly class design, inheritance trade-offs, and when to favor composition.

Communication quality for nearshore remote collaboration. This is the dimension most interview processes skip entirely. Can the candidate explain a blocker clearly in writing? Do they ask clarifying questions before starting ambiguous work? Will they surface problems early or go silent for two days? These behaviors are predictable from structured interview questions, and they matter as much as technical depth for any embedded remote role.


Python Fundamentals Questions

These questions belong in the first 30-minute technical screen. The goal is to establish that the candidate’s Python fundamentals are solid enough to work in a production codebase without constant correction. A strong candidate does not hesitate on these. They answer quickly and often add context you did not ask for.

Python Fundamentals Question
What is the difference between a list, a tuple, and a set in Python?
Tests: basic data structure knowledge. Good answers cover mutability (list vs. tuple), uniqueness and hash requirements (set), and performance trade-offs. Candidates who answer only in terms of syntax without touching on use cases are showing surface-level knowledge.
Python Fundamentals Question
How does Python’s GIL affect multi-threading? When would you use multiprocessing instead?
Tests: concurrency fundamentals. Strong answers explain that the GIL limits true parallelism in CPU-bound threads and that multiprocessing sidesteps this by spawning separate interpreter processes. Candidates who say “just use threads” without acknowledging the GIL are missing a critical Python-specific concept.
Python Fundamentals Question
Explain decorators with a real example from your codebase.
Tests: intermediate Python depth and practical application. The “from your codebase” qualifier is important. It distinguishes candidates who have used decorators functionally (authentication wrappers, retry logic, timing utilities) from those who have only read about them. Vague answers that reference “@login_required” without explaining what it does beneath the surface are a yellow flag at mid-senior level.
Python Fundamentals Question
What is the difference between __str__ and __repr__?
Tests: Python data model awareness. Good answers explain that __str__ is the human-readable representation and __repr__ is the developer/debug representation intended to be unambiguous. Strong candidates note that repr() output ideally allows reconstructing the object.
Python Fundamentals Question
How do you manage Python dependencies and virtual environments on a team project?
Tests: development environment discipline. Good answers cover venv or virtualenv basics, pip with requirements.txt or pyproject.toml, and optionally Poetry or uv. For production codebases, listen for whether they pin dependency versions and why. Candidates who say “I just install globally” are showing a gap that causes real problems on shared infrastructure.
Python Fundamentals Question
What are generators and when would you use them over a list?
Tests: memory and performance awareness. Strong answers explain lazy evaluation and memory efficiency for large datasets. A good candidate gives a concrete use case: streaming large file reads, paginating database queries, or building data pipelines where you do not need all results in memory at once.
Python Fundamentals Question
Explain context managers and the with statement.
Tests: understanding of Python’s resource management protocol. Good answers cover __enter__ and __exit__, the common file-handling example, and ideally a mention of contextlib.contextmanager for creating custom context managers. Candidates who only know it for opening files have limited exposure to production patterns.
Python Fundamentals Question
How does Python handle memory management?
Tests: interpreter internals awareness. Good answers cover reference counting as the primary mechanism, the cyclic garbage collector for breaking reference cycles, and optionally memory arenas for small objects. This question is not about perfection — it is about whether the candidate has thought about what happens beneath the surface.
Engineering manager reviewing Python developer code sample on laptop screen during interview

Framework-Specific Questions (Django / FastAPI / Flask)

Framework questions should match the stack the candidate will actually use. Asking Django ORM questions to a FastAPI developer wastes interview time and signals that your process is not calibrated. Run through the sub-section that applies and skip the others.

Django Questions

Django developers need to understand the ORM, migrations, and the request lifecycle at depth. Surface-level knowledge of models and views is not enough for mid-senior roles.

Django Question
How do you optimize a slow Django ORM query? Walk me through your debugging process.
Tests: ORM depth and production mindset. Strong answers mention select_related() and prefetch_related() for solving N+1 problems, only() and defer() for field selection, and using Django Debug Toolbar or logging the SQL output directly to identify what queries are running. Candidates who jump to “add an index” without first identifying the query are skipping steps.
Django Question
What happens when you run makemigrations and then migrate? What can go wrong?
Tests: migration system understanding. Good answers cover how Django detects model changes, generates migration files, and applies them in order. Candidates who have worked in production teams will mention common failure modes: missing migrations, conflicting migrations in parallel branches, and the risks of data migrations on large tables.
Django Question
What are Django signals and when would you use them?
Tests: framework pattern knowledge. Good answers explain that signals allow decoupled components to be notified when certain actions occur (post_save, pre_delete, etc.) and give a practical use case like sending a welcome email after user creation. Strong candidates also know the downside: signals make code harder to trace and test, and overuse creates hidden coupling.
Django Question
How does Django REST Framework handle serialization and validation? Where do you put business logic?
Tests: DRF architecture judgment. Good answers explain serializers as the boundary layer for input/output and validation, and show awareness that business logic belongs in service objects or model methods — not in serializers or views. Candidates who put all logic in the serializer’s validate() method are building maintenance problems.
Django Question
How do you write a test for a Django view that requires authentication?
Tests: testing discipline. Good answers use Django’s test client with force_login() or APIClient with force_authenticate() in DRF. Candidates who say “I mock the auth middleware” are working around the framework instead of with it.

FastAPI Questions

FastAPI developers need solid async fundamentals and an understanding of how Pydantic integrates with the request/response cycle. These questions test whether their FastAPI knowledge is production-grade or tutorial-level.

FastAPI Question
How does FastAPI’s dependency injection system work? Give me an example from something you have built.
Tests: FastAPI core pattern understanding. Good answers explain Depends() as FastAPI’s mechanism for injecting reusable logic into path operations, with examples like database session management, authentication checks, or configuration injection. Candidates who only know it as “a way to get a DB session” have limited experience with the system’s real power.
FastAPI Question
When should a FastAPI endpoint be async def versus a regular def? What is the difference in how FastAPI handles each?
Tests: async understanding. Strong answers explain that async def endpoints run in the event loop and should only use awaitable calls, while regular def endpoints are run in a thread pool executor to avoid blocking. Mixing blocking I/O into an async def endpoint is a common performance bug that this question surfaces.
FastAPI Question
How do Pydantic models work in FastAPI? What happens when request validation fails?
Tests: Pydantic and request handling knowledge. Good answers cover automatic JSON parsing and validation from Pydantic models, 422 Unprocessable Entity responses on validation failure, and the ability to customize error responses. Candidates should also know about validators (@validator in V1, @field_validator in V2) for custom validation logic.
FastAPI Question
How do you handle background tasks in FastAPI without blocking the response?
Tests: production pattern awareness. Good answers cover FastAPI’s built-in BackgroundTasks for lightweight fire-and-forget work, and Celery or ARQ for heavier background job processing. Candidates who would do heavy processing synchronously before returning a response have not thought through the user-facing implications.

Flask Questions

Flask is a microframework. The questions here probe whether the candidate understands Flask’s intentional minimalism and has made informed decisions about how to extend it.

Flask Question
How do you organize a Flask application as it grows beyond a single file?
Tests: application factory and blueprints knowledge. Good answers describe the application factory pattern (create_app()), blueprints for modular routing, and separation of configuration from application logic. A candidate who has only used Flask for small scripts may not know these patterns exist.
Flask Question
What is Flask’s request context and why does it matter?
Tests: Flask internals understanding. Good answers explain that Flask pushes a request context onto a stack for each incoming request, making flask.request and flask.g available without passing them explicitly. Candidates who have hit “working outside of application context” errors understand this viscerally and should be able to explain it clearly.
Flask Question
How do you choose which Flask extensions to use for a new project?
Tests: decision-making maturity. Good answers show awareness of the Flask extension ecosystem (Flask-SQLAlchemy, Flask-Migrate, Flask-Login, Marshmallow) and consideration of maintenance status, community size, and whether the extension will still be supported in two years. Candidates who pick extensions without evaluating them add technical debt from day one.

Skip Building Your Own Process

Kore BPO pre-screens nearshore Python developers through 5 technical stages before you interview. Profiles in 2 to 5 business days.

See Screened Candidates

Async and Concurrency Questions

Python developer explaining async architecture on whiteboard during technical interview

Async Python is one of the most common sources of production bugs from developers who learned it through documentation rather than production incidents. These questions test whether the candidate understands the execution model, not just the syntax.

Async Question
Explain how Python’s asyncio event loop works. What happens when you await a coroutine?
Tests: async execution model understanding. Good answers explain that the event loop runs coroutines cooperatively, that await suspends the current coroutine and yields control back to the loop, and that the loop resumes the coroutine when the awaited task completes. Candidates who say “it just runs things async” without explaining the cooperative scheduling are showing a surface-level understanding that will produce bugs.
Async Question
What is the difference between asyncio.gather() and asyncio.create_task()? When would you use each?
Tests: async composition knowledge. Good answers explain that both run coroutines concurrently, but create_task() schedules a task immediately while gather() awaits a group of awaitables and collects results. Strong candidates mention that gather() can be configured to handle partial failures with return_exceptions=True.
Async Question
When would you use Celery instead of asyncio for background processing?
Tests: tool selection judgment. Good answers explain that asyncio handles I/O-bound concurrency within a single process, while Celery is appropriate for distributed task queues, CPU-bound work, scheduled jobs, and tasks that need to survive application restarts. A candidate who would use asyncio for a task that processes thousands of records in the background has not thought through the operational implications.
Async Question
What happens if you call a blocking function inside an async def endpoint? How do you fix it?
Tests: async pitfall awareness. The correct answer is that blocking functions stall the entire event loop, blocking all other concurrent requests. The fix is to run the blocking function in a thread pool using asyncio.to_thread() or loop.run_in_executor(). Candidates who have never hit this in production may not know the fix even if they know the problem.
Async Question
How do you test async code in Python? What tools do you use?
Tests: testing discipline for async code. Good answers cover pytest with pytest-asyncio for async test functions, AsyncMock from unittest.mock for mocking async dependencies, and the importance of using an actual async database driver (like asyncpg or databases) in integration tests rather than mocking at the wrong level.

System Design and Architecture Questions

System design questions for Python developers should reflect what the person will actually own. A developer maintaining one Django service in a larger microservices platform needs a different question than someone who will architect a new data pipeline. Calibrate the complexity to the role.

System Design Question
Design a RESTful API for a product catalog that supports filtering, sorting, and pagination. Walk me through your choices.
Tests: API design maturity. Good answers address URL structure, query parameter design, cursor-based versus offset pagination trade-offs, and response envelope consistency. Strong candidates ask clarifying questions: How many products? Read-heavy or write-heavy? Do we need full-text search? Candidates who jump straight to implementation without clarifying requirements are building the wrong thing fast.
System Design Question
Your Python API endpoint is slow under high traffic. Walk me through how you would diagnose and address it.
Tests: production debugging mindset. Good answers start with observability — check metrics, traces, and slow query logs before touching code. Common Python-specific culprits include N+1 ORM queries, missing database indexes, synchronous calls inside async endpoints, and Python’s single-threaded nature when CPU-bound work exists. Candidates who jump immediately to “add more servers” without diagnosing are expensive to have in production.
System Design Question
How would you add caching to a read-heavy Django or FastAPI application? What would you cache and what would you not?
Tests: caching strategy judgment. Good answers cover Redis as the standard caching backend, cache-aside versus write-through patterns, and TTL strategy. Strong candidates also address cache invalidation explicitly, which is the hard part. Candidates who say “cache everything” without discussing invalidation are building a consistency problem.
System Design Question
How do you approach database optimization for a slow query on a large table?
Tests: database and ORM optimization knowledge. Good answers cover EXPLAIN/EXPLAIN ANALYZE to understand the query plan, indexing strategy (composite indexes, partial indexes), and Python-side solutions like query optimization and pagination. Mid-senior candidates should also mention the risks of adding indexes on write-heavy tables and the value of database-level profiling before code changes.

Remote Collaboration and Soft Skills

US engineering team evaluating nearshore Python developer candidate via video call

These questions evaluate the communication and self-management behaviors that determine whether a nearshore Python developer integrates well with a US team or operates as an isolated contractor. They are not generic culture-fit questions. Each one tests a specific behavior that shows up, or fails to show up, in the first 90 days of an embedded remote role.

Collaboration Question
Walk me through how you would onboard yourself to a new codebase without being assigned a specific onboarding plan.
Tests: initiative and structured thinking. Good answers describe a systematic approach: read the README and architecture docs first, set up the local environment, trace a request through the stack end-to-end, and identify the most active parts of the codebase. Candidates who say “I would just ask questions” without a plan are showing dependency, not initiative.
Collaboration Question
How do you communicate a blocker asynchronously when your team lead is in a different time zone?
Tests: async communication behavior. Good answers describe a specific, structured message format: what the blocker is, what they have already tried, what they need, and an estimated delay. The best answers mention updating a Jira ticket or leaving a Slack thread comment so context is preserved across time zones. Candidates who say “I would wait for standup” are showing a gap that costs teams an entire day of progress.
Collaboration Question
What is your process for a code review, both when you are the reviewer and when you receive feedback?
Tests: code review maturity. Good answers on the reviewer side describe checking for correctness, test coverage, naming clarity, and edge cases — not just style. On the receiving side, strong candidates describe responding to comments with technical reasoning, distinguishing between requested changes and suggestions, and not taking feedback personally. Passive acceptance of all feedback without engagement is a weak signal; defensive rejection of all feedback is a red flag.
Collaboration Question
Tell me about a time you disagreed with a technical decision your team made. What did you do?
Tests: professional disagreement handling. Good answers show that the candidate raised their concern clearly and in writing (Slack, PR comment, or design doc), provided a technical rationale, listened to the counter-argument, and then aligned with the team’s decision even if they still privately disagreed. Candidates who always defer without raising concerns are a weak signal. Candidates who describe escalating past the team lead over a code style preference are a red flag.

Async writing test: Before the final round, send the candidate a technical question by email or Slack and ask them to respond within 24 hours. Ask them to explain a Python design decision they made on a real project, the trade-offs they considered, and what they would do differently. The written response tells you more about their day-to-day communication quality than two additional hours of video interviews.


Red Flags to Watch For

Experienced interviewers develop a list of signals that reliably predict problems in the first sprint. These are the most consistent red flags when evaluating Python developers for nearshore embedded roles.

Cannot explain decorators beyond the syntax. Decorators are a core Python pattern. A mid-senior developer who says “I use them but I am not sure exactly how they work” has significant gaps in their language understanding that will surface in code reviews.

Only talks about CRUD operations. If every project the candidate describes boils down to “I built endpoints that read and write to a database,” they have not worked on anything with meaningful business logic, performance requirements, or architectural decisions. The first time they encounter a complex domain model or a performance constraint, they will be starting from scratch.

No testing experience or vague answers about testing. “I test manually” or “we had a QA team for that” from a backend developer is a disqualifying answer for any mid-senior role. If the candidate cannot describe how they write a unit test for a service function with a mocked database call, they are not writing production-grade code.

Vague on async, confident in the interview. Candidates who have read about asyncio but never debugged a blocking call in production tend to speak confidently about async at a conceptual level but go vague when asked “what happens to other requests while that blocking call runs?” Ask the follow-up. The answer reveals whether their knowledge is theoretical or operational.

Cannot describe a technical decision they pushed back on. Developers who cannot recall a single technical disagreement in their career are either working in isolation, not engaged with the codebase, or telling you what they think you want to hear. All three are problems for an embedded nearshore role.

Silent on blockers. Any candidate who describes waiting two or more days before surfacing a blocker to their team is showing exactly the communication pattern that causes nearshore engagements to fail. It is not a minor trait difference. It is a structural mismatch with distributed team work.

Frequently Asked Questions

How many interview rounds should a Python developer process have?

Three to four structured stages is the right range: a 30-minute phone screen for Python fundamentals, a 60-90 minute technical session covering framework depth and a live coding or take-home problem, a 30-minute system design conversation, and a 20-minute communication and nearshore fit evaluation. More than four rounds loses strong candidates to faster-moving offers. Fewer than three risks missing fundamental gaps that surface in the first sprint.

Should I prioritize Django or FastAPI experience when hiring a Python backend developer?

Prioritize whichever framework matches your actual stack. A strong Django developer does not automatically transfer cleanly to FastAPI, particularly on async patterns and Pydantic-based validation. If you are building a new service and have not committed to a framework yet, FastAPI is the stronger default choice in 2026 for performance-sensitive APIs. For content-heavy applications with admin interfaces, Django’s ecosystem is still unmatched. Ask candidates about their framework reasoning — not just their experience — to see whether they can articulate trade-offs.

What Python version should I ask about in the interview?

Ask about the version your production codebase runs. If you are on Python 3.11 or 3.12, the interview should touch on the performance improvements in those releases and whether the candidate has worked with the updated error messages and traceback formatting. Avoid version trivia questions. What matters is whether the candidate understands the language fundamentals that translate across versions, not whether they can recite the changelog.

How do I evaluate English communication in a nearshore Python developer interview?

Evaluate it across the entire interview rather than treating it as a separate category. Watch whether the candidate volunteers context without being prompted, asks clarifying questions before answering ambiguous questions, and structures their explanations so you can follow them without interrupting. Also send the 24-hour async written test before the final round. Written communication quality is a separate signal from spoken English fluency, and it is often the more important one for developers working in US-based sprint environments.

How does Kore BPO screen nearshore Python developers before presenting them?

Kore BPO runs a five-stage process: a Python fundamentals assessment covering data structures, the GIL, generators, and decorators; a framework-specific live coding test in the candidate’s own environment; a system design interview scoped to the client’s architecture; an async written communication evaluation; and direct reference verification with prior US employers or clients. Candidates who reach your interview have already passed all five stages. More detail on the process is at korebpo.com/nearshore-python-developers.

Disclosure: Kore BPO is a nearshore staffing agency. This guide reflects our direct experience screening Python developers from Costa Rica for US engineering teams.

Brian Hunt CEO, Kore BPO
Brian Hunt
CEO & Co-Founder · Kore BPO

Brian Hunt is the CEO of Kore BPO, a US-owned nearshore and offshore staffing partner based in Dallas, TX. With over a decade of experience placing developers from Costa Rica and other nearshore locations with US companies, he has built and refined the screening processes described in this guide.

Get Pre-Screened Python Developers

Kore BPO runs 5 technical screening stages before you see a resume. Costa Rica candidates in 2 to 5 business days.

View Available Python Developers
Same time zone  ·  Django & FastAPI pre-screened  ·  $0 upfront