Answer Posted / glibwaresoftsolutions
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
Does python support interfaces like in java?
In python, how do copy a file?
How will you do debugging in python?
What is the __ init __ method used for?
What is python xrange?
How do you implement json given that python is best suited for the server-side application?
What is a dataframe in python?
Explain whats flask?
How fast can you learn python?
What is @staticmethod?
What is the language from which Python has got its features or derived its features?
What do you understand by the term deep copy?
Which linux is best for python programming?
How do you disconnect from the database?
Does python have polymorphism?