Generators and Iterators

generators returning Iterators that are also Iterables

Recall our string iterator example to refresh what iterable objects and iterators are:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.