What do you mean by iterators?



Suraj Said

+0 -0

i) Iterators are objects in Python that allow you to traverse through a sequence of elements.
ii) They allow you to traverse through a collection (e.g. list, tuple, dictionary, set) one element at a time and perform operations on each element as desired.
iii) The iter() and next() functions are commonly used with iterators in Python.



Submit Your Response