Answer Posted / nashiinformaticssolutions
An object that lets you go through a collection's items (such lists, tuples, or dictionaries) one at a time is called an iterator in Python. An iterator implements two methods: __next__(), which returns the subsequent item in the sequence and raises StopIteration when the sequence is exhausted, and __iter__(), which returns the iterator object itself.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is upper in python?
What does tuple mean?
Is python zero indexed?
Write a program to find the given string in the line?
How to reverse a string in python
Which is better list or dictionary in python?
Is c++ easier than python?
How do you concatenate strings in python?
Is it easier than Django bottle?
What is the syntax for exponentiation and give example?
What is encapsulation in python?
How long do goats sleep?
How do I run a python script?
What is monkey Patching in python?
Is string empty python?