Which statement about Python generators is TRUE?

Python Professional Hard

Python Professional — Hard

Which statement about Python generators is TRUE?

Key points

  • Generators produce values lazily
  • They use `__iter__` and `__next__` for iteration
  • Memory-efficient due to lazy evaluation

Ready to go further?

Related questions