Skip to content

Senior Python interview quizzes

Select an answer and submit each question. Some questions have more than one correct answer; those use checkboxes and require every correct option—and no incorrect option—to be selected. Progress is stored in your browser.

Object model and language behavior

#

What does Python assignment do for a mutable object?

#

Why is a mutable default argument usually a defect?

#

Which statements about equality and hashing are correct?

#

What is the primary meaning of super() in cooperative multiple inheritance?

#

Why do lambdas created in a loop often all observe the final loop value?

Iteration, resources, and memory

#

Which statements about generators are correct?

#

A generator opens a file and yields lines. A caller consumes one line and stops. What is the strongest design?

#

Which tool is most appropriate for locating unexpected allocation growth over time?

Concurrency and async

#

A service makes many requests through a synchronous HTTP client. Which initial design is most reasonable?

#

Which statements about the conventional CPython GIL are correct?

#

What happens when a blocking database client is called directly inside an async route?

#

Why prefer asyncio.TaskGroup for related concurrent operations?

#

Which controls help a high-concurrency client remain production-safe?

Typing, testing, and API design

#

Which statement best distinguishes type hints from runtime validation?

#

When is a Protocol especially useful?

#

What is the most maintainable mocking strategy?

#

A library catches a database exception and raises a domain exception. Which form preserves diagnostic causality?

Performance and architecture

#

What should happen before a performance optimization is selected?

#

A worker consumes messages that may be delivered more than once. Which property is most important?

#

Which concerns belong in a senior design for a rate-limited external API?

#

A dictionary lookup is commonly described as O(1). What is the most precise interview answer?

Interpretation

  • 18–21 correct: strong recall; focus on communication, production stories, and system design.
  • 14–17 correct: interview-ready foundation; revisit explanations for missed topics.
  • 10–13 correct: review the advanced guide and repeat the quiz after coding examples.
  • Below 10: work through the systematic learning path before emphasizing senior scenarios.

A score measures recall, not seniority. Senior performance also requires sound trade-offs, operational judgment, and clear evidence from real engineering work.