examerioLogin

Why use generators in Python?

📘 Explanation

Generators yield values one at a time using lazy evaluation, so you avoid holding the whole sequence in memory at once. The other options describe unrelated features like flexible arguments, automatic parallelism, or raw speed, none of which is the real reason to use generators.

Related questions

← PreviousNo login needed