Tag Archives: iter function in Python

How to iterate over the content of a list in Python

Let’s say that you need to iterate over the content of a list. In order to do that you need to use the iter function that allows you to get access to the associated iterator.

>>> list_one = [1, 2, 3, 4]
>>> iterator_one = iter(list_one)
>>> iterator_one

Continue reading