Engineering

Python Developer mock interview questions

19 questions a Python Developer panel actually asks, with what each one tests and what a strong answer contains, then practice any of them live. Language, concurrency and framework rounds for Python developer interviews.

No account needed

Answer one real Python Developer question now

A question a Python Developer panel actually asks, answered out loud, scored on what you said and how you said it. Under two minutes, and nothing to sign up for.

“A Python script that calls an external API ten thousand times takes hours. How would you speed it up, and does the GIL matter here?”

We never store the audio. Your answer is deleted within 24 hours unless you save the result.

  • Adaptive follow-ups, not a fixed question list
  • Rubric scorecard with evidence from your answers
  • Voice or text, with delivery coaching on voice sessions

Thinking past the interview? Carmen can help with your whole Python Developer career: a switch, a raise, or what comes next.

19 python developer mock interview questions

The questions a Python Developer panel actually asks, with what each one is testing and what a strong answer contains. Click any question to run it in a live session: your AI interviewer will cover it and score how you answer.

  1. 1.

    A Python script that calls an external API ten thousand times takes hours. How would you speed it up, and does the GIL matter here?

    Why they ask it: Tests understanding of concurrency options in Python and when the GIL is relevant.

    A strong answer: The work is IO-bound, so the GIL is not the limit because it is released while waiting on network IO. Use asyncio with an async HTTP client or a thread pool to run requests concurrently, limit concurrency with a semaphore to respect rate limits, add retries with backoff, and reuse connections. For CPU-bound work, use multiprocessing or native extensions instead, since threads would not help in the standard interpreter.

  2. 2.

    What is wrong with a function that has a default argument of an empty list?

    Why they ask it: A classic Python gotcha that tests understanding of how defaults are evaluated.

    A strong answer: Default values are evaluated once when the function is defined, so the same list is shared across calls and changes persist between them. Use None as the default and create a new list inside the function. The same applies to dictionaries and other mutable objects.

  3. 3.

    When would you use a generator instead of returning a list?

    Why they ask it: Tests understanding of lazy evaluation and memory use.

    A strong answer: Generators produce values one at a time, so they use little memory for large or infinite sequences and let processing start before all data is available, such as reading a large file line by line. Lists are better when you need random access, the length, or to iterate several times. Mention that a generator can only be consumed once.

  4. 4.

    An async FastAPI endpoint becomes slow for all users under load. What might be happening?

    Why they ask it: Blocking calls inside async code are a common problem in modern Python services.

    A strong answer: A blocking call such as a synchronous database driver, requests, or CPU-heavy work inside an async function blocks the event loop, so all requests wait. Fix by using async libraries, running blocking work in a thread pool, defining the endpoint as a regular function so the framework runs it in a threadpool, or moving heavy work to a background job queue.

  5. 5.

    How do you manage dependencies and environments for a Python project so builds are reproducible?

    Why they ask it: Packaging problems are a frequent source of wasted time in Python teams.

    A strong answer: Use a virtual environment per project, declare dependencies in pyproject.toml, lock exact versions with a lock file using a tool the team has standardised on, install from the lock in CI and containers, pin the Python version, and update dependencies regularly with tests.

  6. 6.

    A data processing job is slow and you are not sure which part. How do you find out?

    Why they ask it: Profiling before optimising is a key habit.

    A strong answer: Profile with cProfile or a sampling profiler to find where time goes, check for slow patterns such as repeated lookups in lists instead of sets, loops that could be vectorised with a library like NumPy or pandas, and repeated IO. Measure after each change and keep the code readable.

  7. 7.

    Tell me about a time you improved the quality of a Python codebase that others worked in.

    Why they ask it: Python's flexibility means codebases can become hard to maintain. The interviewer wants practical improvements.

    A strong answer: The problem such as no tests, inconsistent style or unclear types, what you introduced such as pytest coverage for critical areas, type hints with a type checker, formatting and linting in CI, and how you got the team to adopt it gradually.

How the Python Developer interview runs

Usually a recruiter screen, then a coding round in Python where readability and idiomatic use of the language are judged along with correctness. A second technical round goes into the language and runtime: data structures, generators, the GIL and concurrency options, packaging and testing. Depending on the team, a later round covers a web framework such as Django, Flask or FastAPI, or data processing, plus a design discussion.

What the panel scores

Language fluency

Whether you write idiomatic, correct Python.

  • Knows common gotchas such as mutable defaults
  • Uses generators and data structures appropriately
  • Writes readable code

Concurrency and performance

Whether you choose the right tools for speed.

  • Explains when the GIL matters
  • Avoids blocking the event loop
  • Profiles before optimising

Engineering practice

Whether projects are reproducible and maintainable.

  • Manages dependencies with lock files
  • Uses tests, types and linting
  • Improves codebases gradually

Frameworks and design

Whether you build services and tools that hold up.

  • Understands the chosen framework's model
  • Moves slow work to background jobs
  • Designs clear interfaces

Common questions in every interview

These come up in almost every Python Developer interview regardless of the company or the round.

  1. 8.

    Tell me about yourself.

    Why they ask it: Opens the interview and sets the frame. The interviewer is checking whether you can select what matters for this job rather than narrate your whole history.

    A strong answer: A 60-90 second arc: where you are now, one or two proof points that match the posting, and why this role is the logical next step. Present, past, then future.

  2. 9.

    Why do you want this role?

    Why they ask it: Tests whether you read the job description or mass-applied. Weak answers are about what the candidate gets; strong answers connect to the work itself.

    A strong answer: Two specifics from the posting or the company's actual work, plus an honest line about what you want to get better at here.

  3. 10.

    Walk me through your resume.

    Why they ask it: Checks that your story holds together and that the transitions were deliberate rather than accidental.

    A strong answer: Chronological but fast, with a reason attached to each move and more time on the roles closest to this one.

  4. 11.

    Tell me about a time you failed.

    Why they ask it: Tests self-awareness and whether you own outcomes. Interviewers are listening for a real failure, not a disguised strength.

    A strong answer: A genuine miss, what you specifically got wrong, the cost, and the concrete thing you changed afterwards that has since held up.

  5. 12.

    Tell me about a conflict with a coworker or manager.

    Why they ask it: Predicts how you behave when the team disagrees. The trap is blaming the other person.

    A strong answer: The substance of the disagreement, what you did to understand their position, how it resolved, and what the working relationship looked like after.

  6. 13.

    What's your greatest strength?

    Why they ask it: Checks whether you know what you're actually good at and can prove it.

    A strong answer: One strength that maps to the posting, plus a short example where it produced a measurable result.

  7. 14.

    What's your greatest weakness?

    Why they ask it: Tests honesty and whether you're actively working on something. Rehearsed non-answers ('I work too hard') read as evasive.

    A strong answer: A real limitation that isn't core to the job, the system you built to manage it, and evidence it's improving.

  8. 15.

    Tell me about a time you had to influence someone without authority.

    Why they ask it: Almost every role depends on getting people who don't report to you to change course.

    A strong answer: What you wanted, why they resisted, the evidence or framing that moved them, and what actually shipped as a result.

  9. 16.

    Where do you see yourself in five years?

    Why they ask it: Tests whether this job fits your trajectory, which is a retention question in disguise.

    A strong answer: A direction rather than a title, and a line about the skills this role would build toward it. Vague ambition and rigid title-chasing both land badly.

  10. 17.

    Why are you leaving your current job?

    Why they ask it: Screens for red flags. Interviewers listen for how you talk about people you no longer work with.

    A strong answer: Forward-looking and specific about what you're moving toward. Criticism of a former employer costs you more than it gains, even when it's deserved.

  11. 18.

    What are your salary expectations?

    Why they ask it: Checks whether you've done market research and whether you're in range before anyone spends more time.

    A strong answer: A researched range with your target near the bottom of it, framed against the scope of the role. Deflect once if the posting has no band, then answer.

  12. 19.

    Do you have any questions for us?

    Why they ask it: The most under-prepared question in the interview, and the one that most changes the final impression.

    A strong answer: Two or three questions about how the team actually works: what the first 90 days look like, how success is measured, what the hardest part of the job is.

Every round ends in a scorecard like this

Your Python Developer answers, quoted back, scored on what this role is judged on, with the line to say instead.

Round Zero interview scorecard: a quoted answer flagged 'Light on metrics', a suggested fix, and an overall score of 84 out of 100.Round Zero interview scorecard: a quoted answer flagged 'Light on metrics', a suggested fix, and an overall score of 84 out of 100.

Real screen from the app. Sample from a product design round.

Related roles

All Engineering →

No spam. Unsubscribe anytime.

Ready to practice as a Python Developer?

Sign up free, no card. 30 voice minutes and unlimited typed interviews, each ending in the complete scorecard: rubric scores, strengths, and what to fix next. Nothing is blurred.

  • ✓ Predefined role or paste any job description
  • ✓ Rubric scores with evidence quotes
  • ✓ 888+ roles to choose from

Questions & answers

Is the Python Developer mock interview free?
Yes. 30 voice minutes and unlimited typed Python Developer interviews, no card. You get the complete rubric scorecard every time, with the evidence quoted from your own answers. Nothing is blurred.
Can I use my own job description instead?
Yes. Predefined roles are starting points. Paste any JD in the setup form and your AI interviewer will tailor questions to that posting.
How is scoring tailored to this role?
We pre-fill a realistic Python Developer job description and interview format so questions and the scorecard match how this role is actually interviewed.
Should I tailor my resume before practicing?
Run a resume fit check against a Python Developer job description first, then practice the interview with the same JD for a tighter loop.