Skip to main content
Journey Uncommon Logo
JourneyUncommon

Python Interview Questions (570 to practise)

Python is the default language for scripting, data work, and back-end services that value readability over raw speed.

Mutable default arguments, the difference between shallow and deep copies, generator laziness, decorator ordering, and how the MRO resolves multiple inheritance.

Total questions
570
Easy
115
Medium
211
Hard
244

Where it shows up: Backend, data engineering, machine learning, automation, and almost every infrastructure team's glue code.

Sample Python questions

Twenty real Python questions from the library, code snippet included. Nothing here is paraphrased for search engines. It is the same text a signed-in user sees.

Sign in to answer

Everything above is free to read. Answering needs a free account.

We keep the correct answer, the explanation and the scoring behind sign-in so the platform stays honest, which is why the answer options and the worked explanation for every Python question stay behind a free account. Signing in is free and takes a few seconds.

Python topics covered

52 distinct Python topics are tagged across the library. These are the real topic labels stored on the questions, not a hand-written list.

  • int float bool str (43)
  • list ops and slicing (38)
  • string methods strip split join (25)
  • data model dunder dispatch (25)
  • type hints Optional Union (25)
  • identity vs equality (23)
  • generators and yield (20)
  • metaclasses and __new__ (16)
  • __slots__ layout (16)
  • collections (15)
  • MRO and C3 linearization (14)
  • variables and None (14)
  • itertools (14)
  • keyword-only args (14)
  • dataclasses (14)
  • asyncio event loop internals (13)
  • exception chaining (12)
  • multiprocessing vs threading pickling (12)
  • property (11)
  • refcounting and cyclic GC (11)
  • collections Counter defaultdict deque (10)
  • classmethod vs staticmethod (10)
  • interning (10)
  • decorators with arguments (10)
  • await scheduling (10)
  • custom context managers (10)
  • contextmanager (10)
  • shallow vs deep copy (9)
  • pathlib (9)
  • descriptors (9)
  • enum (8)
  • __init_subclass__ (8)
  • CPython bytecode and dis (8)
  • the GIL (7)
  • free-threaded no-GIL (7)
  • mutable default trap (6)
  • C-extension boundary buffer protocol (6)
  • import system finders loaders (6)
  • venv and pip (5)
  • f-strings (4)
  • functools.lru_cache (4)
  • bytecode caching and frames (4)
  • functools lru_cache partial (4)
  • import system finders and loaders (3)
  • C-extension boundary / buffer protocol (3)
  • functools (2)
  • the import system finders loaders (2)
  • == vs equals (1)
  • Import system (finders & loaders) (1)
  • functools.partial (1)
  • C-extension boundary and buffer protocol (1)
  • Multiprocessing vs threading / pickling (1)

Search and filter every Python question

Difficulty