What is asked in a Python interview, how to answer about GIL, asyncio and typing, and how to rehearse a conversation with an AI trainer.
A Python interview tests not a list of libraries, but an understanding of how the language works under the hood. A candidate who knows the syntax but cannot explain why their code slows down on one hundred thousand records loses to someone who understands the execution model.
| Stage | What is assessed |
|---|---|
| Screening | experience, stack, salary expectations |
| Language theory | GIL, memory, typing, iterators |
| Live coding | how you write and reason aloud |
| Architecture / systems | how you design a service, database, queues |
The Global Interpreter Lock prevents multiple threads from executing bytecode at the same time. The practical takeaway: threads are useful for I/O, while CPU-bound workloads require processes or offloading to a separate service. An answer without this takeaway is considered superficial.
They expect not definitions but tool selection for the task: thousands of concurrent network requests — asyncio; heavy computations — multiprocessing; blocking libraries — a thread pool. The ability to explain the choice is the main thing.
Type annotations do not affect runtime but catch errors during checking. They often ask about `Optional`, `Union`, `Protocol`, and generics: why they are needed and how you use them in a project.
The classic: a mutable default argument (`def f(x, y=[])`), copying by reference versus `deepcopy`, hashability of dictionary keys. Here they check whether you have caught such bugs in real code.
The difference between a list and a generator, lazy evaluation, `yield`, why `itertools` is needed. Usually they give a task: process a large file without loading it into memory.
For your stack: Django ORM vs raw SQL, N+1 queries, transactions, indexes. For FastAPI — dependencies, Pydantic validation, asynchronous endpoints.
pytest, fixtures, mocks, coverage. Docker, migrations, CI. They check whether you bring code to production, not just to “works locally”.
The structure works: claim → justification → example → limitation.
«For this task I would use asyncio. The reason is that the workload is network-bound, not compute-bound, and threads here would only add context switches. In a previous project, this is how we removed blocking when calling an external API. Limitation: if there is a synchronous library inside, it will block the event loop — it will have to be moved to an executor».
The last sentence is what distinguishes a practitioner: he knows where his solution breaks.
A week of 30–40 minutes a day if you have practice: work through the seven topics above, say the answers out loud, and go through one full dialogue once. If some topic (for example, asyncio) is unclear to you, cover it first; otherwise, the answer structure won't save you.
Yes, but in different proportions. Product teams more often give practical tasks (optimize a query, break down a pipeline), large tech companies — classic tasks on arrays, strings, hash tables. It is worth clarifying the format with the recruiter.
Say it directly and show your thought process: what it is similar to, how you would check. The interviewer almost always distinguishes “I don’t know, but I think” from making things up, and the latter is a direct minus.
No. They usually ask about the stack specified in the vacancy. But understanding the principles (routing, dependencies, working with a DB) transfers between frameworks, and this is valued higher than knowledge of a specific API.
As a range, not a single number, based on the market. A detailed breakdown is in the article salary negotiations.
Describe the situation in one phrase — «Python developer interview, FastAPI, four years of experience» — and go through the dialogue in simulator. The coach will ask questions about your role and review your answers after the conversation.
Go through the seven topics and mark those where your answer doesn't add up. Then run the full dialogue: open HintMeTalk AI, mode “Coach”, describe the vacancy in one phrase. After the review, you can see which answers are weak — usually two or three out of ten.
General preparation for any interview — in the article interview preparation. The frontend interview is covered separately.
Practise this skill in HintMeTalk AI
Open the app