Back to Prep Library
Category Blueprint
Python Interview Library
Pythonic structures, generator pipes & CPython internals
Questions100
Views62.0k
Upvotes3.7k
Filter
Question Catalog
(100 visible)Python· DSA
What are common useful string methods?
1.1k42
easy
Python· DSA
What is the difference between '==' and 'is'?
1.1k4
easy
Python· DSA
What are mutable and immutable types in Python?
1.1k60
easy
Python· DSA
Why use virtual environments?
1.1k55
easy
Python· DSA
How does slicing with start:stop:step work?
1.1k67
easy
Python· DSA
How does iterable unpacking work?
1.0k13
easy
Python· DSA
How are Python dictionaries implemented and ordered?
72454
easy
Python· DSA
What is the difference between a list and a tuple?
54953
easy
Python· DSA
What set operations does Python support?
54577
easy
Python· DSA
What are f-strings?
47441
easy
Python· DSA
What is the difference between __repr__ and __str__?
45276
easy
Python· DSA
How does the in operator work in Python?
45150
easy
Python· DSA
How do you sort with a custom key, and how does sorted differ from sort?
40412
easy
Python· DSA
How does comparison chaining (a < b < c) work?
35035
easy
Python· DSA
What do enumerate and zip do?
34647
easy
Python· DSA
What values are falsy in Python?
25859
easy
Python· DSA
What is duck typing in Python?
13519
easy
Python· DSA
What is the walrus operator?
10938
easy
Python· DSA
How does exception handling work in Python?
8728
easy
Python· DSA
What is the difference between shallow and deep copy?
1.2k65
medium
Python· DSA
What are mixins in Python?
1.2k8
medium
Python· DSA
What is the difference between an iterable and an iterator?
1.1k27
medium
Python· DSA
What are dunder (magic) methods?
1.1k47
medium
Python· DSA
What do the global and nonlocal keywords do?
1.1k70
medium
Python· DSA
What is structural pattern matching (match/case)?
1.1k52
medium
Python· DSA
What is the difference between bytes and str?
1.1k53
medium
Python· DSA
How does collections.deque work internally?
1.0k43
medium
Python· DSA
What is the @property decorator?
1.0k48
medium
Python· DSA
What is composition versus inheritance?
1.0k4
medium
Python· DSA
What are decorators in Python?
1.0k8
medium
Python· DSA
How do generator pipelines stream data lazily?
99047
medium
Python· DSA
What useful types does the collections module provide?
96477
medium
Python· DSA
What is the difference between a module and a package?
9390
medium
Python· DSA
What are abstract base classes and Protocols?
92313
medium
Python· DSA
What is the LEGB rule for scope resolution?
8885
medium
Python· DSA
How does heapq work in Python?
85131
medium
Python· DSA
How does a + b dispatch in Python?
82639
medium
Python· DSA
What are lambda functions and map/filter/reduce?
82380
medium
Python· DSA
What is the difference between classmethod and staticmethod?
79011
medium
Python· DSA
How does exception propagation work up the call stack?
7732
medium
Python· DSA
What do *args and **kwargs mean?
7434
medium
Python· DSA
When do you use threading, multiprocessing, or asyncio?
73911
medium
Python· DSA
What are dataclasses?
73230
medium
Python· DSA
How does a for loop work under the hood?
72546
medium
Python· DSA
What are bound and unbound methods in Python?
70716
medium
Python· DSA
How does yield from delegation work?
7073
medium
Python· DSA
What is the difference between the call stack and the heap in Python?
64964
medium
Python· DSA
How does functools.lru_cache work?
64423
medium
Python· DSA
How does functools.reduce fold a sequence?
53224
medium
Python· DSA
Why use functools.wraps when writing decorators?
50254
medium
Python· DSA
What are generators and why use them?
4988
medium
Python· DSA
How does Python's name and object reference model work?
48770
medium
Python· DSA
How does the bisect module work?
47346
medium
Python· DSA
Why does Python cache small integers?
46922
medium
Python· DSA
What is string interning in Python?
46828
medium
Python· DSA
What does the functools module offer?
4539
medium
Python· DSA
How does Timsort make Python's sort fast and stable?
4367
medium
Python· DSA
What is the memory difference between a list comprehension and a generator expression?
39711
medium
Python· DSA
What is the difference between class variables and instance variables?
38628
medium
Python· DSA
What are generics and TypeVar in Python?
36522
medium
Python· DSA
What are list/dict/set comprehensions?
2133
medium
Python· DSA
What is a context manager?
17933
medium
Python· DSA
What is monkey patching in Python?
17919
medium
Python· DSA
What is a generator's lifecycle?
17019
medium
Python· DSA
How does a Python list grow in memory?
16162
medium
Python· DSA
How do you use multiple context managers at once?
16033
medium
Python· DSA
What is the difference between concurrency and parallelism in Python?
12264
medium
Python· DSA
What is EAFP vs LBYL in Python?
9020
medium
Python· DSA
What is pickling and what are its risks?
8452
medium
Python· DSA
What is the itertools module used for?
6816
medium
Python· DSA
What does __slots__ do?
5134
medium
Python· DSA
How do type hints work in Python?
4119
medium
Python· DSA
What is a race condition and how do locks prevent it?
1.2k76
hard
Python· DSA
How does Python manage memory and garbage collection?
1.1k24
hard
Python· DSA
What is the Global Interpreter Lock (GIL)?
1.1k33
hard
Python· DSA
Why is using a mutable default argument dangerous?
1.0k71
hard
Python· DSA
What is an async iterator and async for?
95458
hard
Python· DSA
How does the Python import system work?
90256
hard
Python· DSA
What is a metaclass?
90155
hard
Python· DSA
What is the difference between __new__ and __init__?
87667
hard
Python· DSA
What is a weak reference in Python?
72920
hard
Python· DSA
How do you create and chain custom exceptions?
72372
hard
Python· DSA
How does CPython execute your code?
71931
hard
Python· DSA
How does an LRU cache work internally?
71054
hard
Python· DSA
What is a deadlock in Python?
69470
hard
Python· DSA
How does multiprocessing share data between processes?
69138
hard
Python· DSA
What is the Method Resolution Order (MRO)?
68415
hard
Python· DSA
What is the difference between a generator and a coroutine?
54633
hard
Python· DSA
What is a decorator factory (a decorator with arguments)?
5348
hard
Python· DSA
How does the asyncio event loop schedule coroutines?
46520
hard
Python· DSA
What is the __hash__ and __eq__ contract?
45642
hard
Python· DSA
What is the difference between __getattr__ and __getattribute__?
40757
hard
Python· DSA
How does attribute lookup work on a Python object?
40224
hard
Python· DSA
What is the late-binding closure pitfall in loops?
35168
hard
Python· DSA
What is the descriptor protocol?
34025
hard
Python· DSA
What is __init_subclass__ in Python?
2232
hard
Python· DSA
What is the difference between del, __del__, and garbage collection?
21832
hard
Python· DSA
How does async/await work in Python?
14152
hard
Python· DSA
How do closures capture variables in Python?
9459
hard
Python· DSA
How does a Python set find items?
7829
hard
Difficulty Distribution
Easy19 (19%)
Medium53 (53%)
Hard28 (28%)
Tested Topics
#oop#generators#memory#data-structures#dunder#str#exceptions#concurrency
Study Guide
Master the GIL runtime limits, decorator wraps, generator pipe memory optimizations, and asyncio context loops.