Home/Interview prep/Programming with Python Fundamentals Workshop

Walk into the interview already prepared.

Timed mock tests and model answers written by working engineers, for every level from fresher to lead. Pick any of our 75 courses below.

Topic: Python. Questions are shared by related courses. View the Programming with Python Fundamentals Workshop course → · Follow the Python roadmap →

All Programming with Python Fundamentals Workshop interview questions at a glance+

Fresher (0–3 years): Junior Python Developer

  1. List vs tuple vs set vs dict: when do you use each?
  2. Explain *args and **kwargs.
  3. How do you handle errors in Python?
  4. Which Python type is immutable?
  5. What does [x * 2 for x in range(3)] produce?
  6. Fastest way to check whether an item exists in a large collection?
  7. What does "with open(path) as f:" guarantee?
  8. Which tool isolates a project's dependencies?
  9. What is the result of 7 // 2?

Mid-level (3–8 years): Python Developer

  1. Explain how you would structure a medium-size Python service.
  2. When would you use threads, multiprocessing or asyncio?
  3. How do you find and fix a performance problem in Python code?
  4. What does a generator (yield) give you?
  5. The GIL in CPython mainly limits…
  6. What does @property do?
  7. Which framework is common for testing in Python?
  8. asyncio is best for…
  9. A default mutable argument (def f(x=[])) causes…

Experienced (8–15 years): Senior Python Engineer

  1. How would you set Python engineering standards for a team?
  2. Design a plugin system in Python.
  3. Scale a Python data-processing job that has become too slow.
  4. Type hints with mypy mainly help…
  5. Dependency injection in Python helps…
  6. Memory leaks in long-running Python services often come from…
  7. Best practice for releasing internal Python libraries?
  8. Choosing between pandas and Polars for big data frames, Polars offers…
  9. Securing a Python web API includes…