Python Interview Prep
Pythonic code, internals and real-world services
Python interview questions: fundamentals, data structures, concurrency, FastAPI, testing, performance and architecture.
- Topics
- 40
- Questions
- 4305
- Flashcards
- 3680
What you'll cover
Open a topic to preview its key ideas, the Learn step of the Sharp method.
Advanced Python
175 Q · 161 cardsClass-Based Context Managers, contextlib Helpers, Decorator Factories, functools.wraps, Resource Cleanup, Simple Decorators
175 questions with answers →Test this topic →Architecture
200 Q · 184 cardsBackground Jobs, Caching, Container And Process Shape, Environment-Based Deployment, Idempotency, Layered Architecture
200 questions with answers →Test this topic →Automation Scripts
100 Q · 92 cardsImport/Export Mini Project, Input Assumptions, Reporting and Auditability, Script Entry Points
100 questions with answers →Test this topic →Classes and Objects
75 Q · 69 cardsDataclass Basics, Factories, When To Use A Class
75 questions with answers →Test this topic →CLI Design
75 Q · 69 cardsArgparse And Commands, Environment Configuration, Runnable Project Shape
75 questions with answers →Test this topic →Code Quality
50 Q · 46 cardsLinters And Formatters, mypy Feedback
50 questions with answers →Test this topic →Code Reading
50 Q · 46 cardsDry Runs And Rule Narration, First Mini Project
50 questions with answers →Test this topic →Code Review
75 Q · 69 cardsAbstraction Discipline, Readability Tradeoffs, Review Quality
75 questions with answers →Test this topic →Concurrency
175 Q · 161 cardsasync def and await, Cancellation, GIL Judgment, Processes For CPU Work, Semaphores, Timeouts, and Cancellation, Task Coordination
175 questions with answers →Test this topic →Control Flow
100 Q · 92 cardsBranching Policies, For Loops, Guard Clauses, While Loops and Retries
100 questions with answers →Test this topic →Core Collections
175 Q · 161 cardsAggregation Patterns, Dicts, Lists, Nested Data, Sets, Sorting and Grouping
175 questions with answers →Test this topic →Data Access
125 Q · 115 cardsBasic SQLite Queries, Parameterized Queries, Repository Boundaries, Row Mapping, Transactions
125 questions with answers →Test this topic →Data Cleanup
50 Q · 46 cardsNormalization Pipelines, Safe Output Writes
50 questions with answers →Test this topic →Debugging
50 Q · 46 cardsLogging, Tracebacks and Root Cause
50 questions with answers →Test this topic →Domain Modeling
125 Q · 115 cardsComposition, Instance Methods, Invariants In __post_init__, Mini Domain Model, Properties And Encapsulation
125 questions with answers →Test this topic →Exceptions
100 Q · 92 cardsCustom Exceptions, Error Translation, Raising Exceptions, Try and Except
100 questions with answers →Test this topic →FastAPI
100 Q · 92 cardsAPI Errors, Pydantic Models, Route Handlers, Validation
100 questions with answers →Test this topic →Functions
75 Q · 69 cardsBatch Helpers, Function Extraction, Return Values
75 questions with answers →Test this topic →HTTP Integration
150 Q · 138 cards429s and Backoff, Authentication, Basic HTTP Clients, JSON Mapping, Pagination and Rate Limits, Timeouts and Retries
150 questions with answers →Test this topic →Interview Strategy
250 Q · 230 cardsAnswer Structure, Behavioral Stories, Debugging Stories, Handling Uncertainty, Mock Answer Quality, Performance Interview Answers
250 questions with answers →Test this topic →Iterators and Generators
75 Q · 69 cardsGenerator Expressions, Iterator Protocol, Yield And Custom Generators
75 questions with answers →Test this topic →Memory
50 Q · 46 cardsLong-Lived Objects, Tracing Allocations
50 questions with answers →Test this topic →Performance
125 Q · 115 cardsData Structure Choice, Microbenchmarks, Optimization Boundaries, Profiling First, Profiling Stories
125 questions with answers →Test this topic →Project Tooling
125 Q · 115 cardsEntry Points, Module Boundaries, Package Layout, Project Metadata, Virtual Environments
125 questions with answers →Test this topic →Python Fundamentals
125 Q · 115 cardsBuilt-in Types and None, Expressions and Arithmetic, f-Strings and Output Formatting, Tracing and Code Reading, Variables and Names
125 questions with answers →Test this topic →Python Internals
175 Q · 161 cardsClosures and Scope, Dunder Methods, Import System and Caching, Mutability Traps, Properties and Descriptors, Reference Counting and GC
175 questions with answers →Test this topic →Python Interview Questions
305 Q · 0 cardsData Structures • Binary Search Trees, Data Structures • bisect on Sorted Lists, Data Structures • collections.deque for Stacks and Queues, Data Structures • Counter and Frequency Maps, Data Structures • defaultdict for Grouping, Data Structures • Dictionaries and Hash Tables
305 questions with answers →Test this topic →Pythonic Data Processing
100 Q · 92 cardsDict Comprehensions, Lazy Pipelines, List Comprehensions, Set Comprehensions
100 questions with answers →Test this topic →Security
200 Q · 184 cardsDependency Hygiene, Deserialization Safety, Input Validation, Log Redaction, Safe Subprocess Calls, Secrets Management
200 questions with answers →Test this topic →Service Design
125 Q · 115 cardsDependency Injection, DTO Mapping, Integration Client Shape, Repository Boundaries, Service Layer
125 questions with answers →Test this topic →SQL
75 Q · 69 cardsIndexes And Access Patterns, Joins, Schema Thinking
75 questions with answers →Test this topic →Testing
225 Q · 207 cardsAPI Contract Testing, Arrange Act Assert, Basic pytest Assertions, Boundary And Failure Tests, Fixtures, Monkeypatching and Mocks
225 questions with answers →Test this topic →Type Hints
100 Q · 92 cardsFunction Type Hints, Optional And Collections, Protocols, TypedDict And Shaped Data
100 questions with answers →Test this topic →
Question formats
Practice the formats you'll actually see. Code examples included.
- Multiple choice · 4305
Start Python Interview Prep
Create a free account to save progress, track weak topics and keep your streak.