Skip to main content
JourneyUncommon

Python Intermediate

Decorators, generators, OOP quirks. Level up your Python.

Questions
15
Tier
Intermediate
Language
Python
Time
~18 min

Difficulty mix: 3 easy, 7 medium and 5 hard. The questions are drawn from the Python library at the moment you start, so sitting the test twice does not give you the same paper.

What this test can pull from

52 Python topics are in scope. These are the real topic labels on the questions.

  • int float bool str
  • list ops and slicing
  • string methods strip split join
  • data model dunder dispatch
  • type hints Optional Union
  • identity vs equality
  • generators and yield
  • metaclasses and __new__
  • __slots__ layout
  • collections
  • MRO and C3 linearization
  • variables and None
  • itertools
  • keyword-only args
  • dataclasses
  • asyncio event loop internals
  • exception chaining
  • multiprocessing vs threading pickling
  • property
  • refcounting and cyclic GC
  • collections Counter defaultdict deque
  • classmethod vs staticmethod
  • decorators with arguments
  • interning
  • await scheduling
  • custom context managers
  • contextmanager
  • shallow vs deep copy
  • pathlib
  • descriptors

Questions of the kind this test asks

Six real Python questions from the same pool, snippet included. The answer options and explanations are not shown here. Those come after you attempt them.

Prefer to pick your own questions? Browse all Python questions. See the other 10 tests.