Build an iterator that cycles through a list forever, with a stop limit.
Constraints
Example
>>> it = CyclicIterator([1, 2, 3], 3) >>> list(it) [1, 2, 3] >>> it = CyclicIterator(['a', 'b'], 5) >>> list(it) ['a', 'b', 'a', 'b', 'a'] >>> it = CyclicIterator([True, False], 0) >>> list(it) []
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints