| 1 | How do dict comprehensions and set comprehensions differ in syntax from list comprehensions? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Intermediate |
| 2 | How would you implement a coroutine-style generator-based pipeline (the classic pre-async/await pattern) using multiple chained 'send()'-driven generators? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Advanced |
| 3 | How do you write a basic list comprehension, and how does it compare to an equivalent for loop? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Beginner |
| 4 | How do you add a filtering condition to a list comprehension using 'if'? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Beginner |
| 5 | What is a generator function, and how does 'yield' make it different from a regular function? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Beginner |
| 6 | What is a generator expression, and how does it differ syntactically and behaviorally from a list comprehension? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Intermediate |
| 7 | How do you write a nested comprehension, like flattening a list of lists into a single flat list? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Intermediate |
| 8 | How do you send a value INTO a generator using the .send() method, and how does this differ from just calling next()? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Intermediate |
| 9 | How does 'yield from' delegate iteration to a sub-generator, and what does it return as its own expression value? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Advanced |
| 10 | How does generator.throw() let you inject an exception into a paused generator, and how would the generator handle it? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Advanced |
| 11 | How does lazy evaluation in a chained sequence of generator expressions actually process elements, one at a time end-to-end, without intermediate lists? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Advanced |
| 12 | How would you implement a memory-efficient sliding window or batching generator over a large iterable? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Advanced |
| 13 | How do you correctly close a generator early and ensure any try/finally cleanup inside it still runs? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Advanced |
| 14 | How do you write a comprehension with MULTIPLE 'if' conditions, and how does that differ from combining them with 'and'? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Advanced |
| 15 | How would you profile whether a generator expression is actually providing a measurable memory or performance benefit over a list comprehension in a specific use case? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Advanced |
| 16 | How do async comprehensions work, combining 'async for' directly inside a list/set/dict comprehension? Python › Async Generators & Async Context Managers | Python | Async Generators & Async Context Managers | Intermediate |
| 17 | How do you build an async generator pipeline, chaining one async generator's output into another, like a synchronous generator pipeline? Python › Async Generators & Async Context Managers | Python | Async Generators & Async Context Managers | Intermediate |
| 18 | What is the relationship between generators and the iterator protocol? Python › Iterators & the Iterator Protocol | Python | Iterators & the Iterator Protocol | Intermediate |
| 19 | How can generators and iterators help reduce peak memory usage compared to building full lists? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Advanced |
| 20 | What is the difference between an iterable and an iterator in Python? Python › Iterators & the Iterator Protocol | Python | Iterators & the Iterator Protocol | Beginner |
| 21 | What does the built-in next() function's optional default argument do? Python › Iterators & the Iterator Protocol | Python | Iterators & the Iterator Protocol | Beginner |
| 22 | Why do you need the 'global' keyword to MODIFY a global variable from inside a function, but not to simply READ it? Python › Functions & Scope | Python | Functions & Scope | Intermediate |
| 23 | What does functools.reduce do, and why is it often discouraged in favor of loops? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Intermediate |
| 24 | What does functools.reduce's initializer argument do, and why should you usually provide one? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Intermediate |
| 25 | What is the practical difference between using functools.reduce and a plain for-loop for accumulation? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Intermediate |
| 26 | How do you implement a custom iterator by defining __iter__ and __next__? Python › Iterators & the Iterator Protocol | Python | Iterators & the Iterator Protocol | Intermediate |
| 27 | How does the itertools module complement the iterator protocol? Python › Iterators & the Iterator Protocol | Python | Iterators & the Iterator Protocol | Intermediate |
| 28 | What is the difference between iter(obj) and using obj directly in a for-loop, in terms of what Python calls internally? Python › Iterators & the Iterator Protocol | Python | Iterators & the Iterator Protocol | Intermediate |
| 29 | What is the difference between IQueryable<T> and IEnumerable<T> when writing EF Core queries, and why does it matter for performance? .NET › Entity Framework Core & Data Access | .NET | Entity Framework Core & Data Access | Intermediate |
| 30 | What is LINQ, and how does it simplify querying collections compared to writing manual loops? C# › LINQ | C# | LINQ | Intermediate |
| 31 | How does a closure capture variables from its enclosing scope, and what pitfall occurs when creating multiple closures inside a loop? Python › Functions & Scope | Python | Functions & Scope | Advanced |
| 32 | How does functools.cmp_to_key bridge old-style comparison functions with Python 3's key-based sorting? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Advanced |
| 33 | What is the difference between __iter__ returning self versus returning a separate iterator object? Python › Iterators & the Iterator Protocol | Python | Iterators & the Iterator Protocol | Advanced |
| 34 | How would you implement a lazy, chainable iterator pipeline (like filter-then-map) from scratch? Python › Iterators & the Iterator Protocol | Python | Iterators & the Iterator Protocol | Advanced |