SLIDE 1
Iterators
!4
A container can provide an iterator that provides access to its elements in order iter(iterable): next(iterator): Return an iterator over the elements
- f an iterable value
Iterators Iterators A container can provide an iterator that - - PowerPoint PPT Presentation
Iterators Iterators A container can provide an iterator that provides access to its elements in order iter (iterable): Return an iterator over the elements of an iterable value >>> s = [3, 4, 5] >>> t = iter(s) next
!4
!6
!9
!11
!13