inicio programacao python 1

inicio programacao python

for i in iter(obj):
    print(x)

for i in obj:
    print(i)

Here is what the above code is Doing:
1. The iter() function takes an iterable object and returns an iterator.
2. The next() function takes an iterator and returns the next item.
3. The for loop calls iter() on the iterable object, and then calls next() on the iterator until a StopIteration exception is raised.

Similar Posts