Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are python iterators?

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


Please Help Members By Posting Answers For Below Questions

Explain me what is the statement that can be used in python if the program requires no action but requires it syntactically?

887


Can you remove the whitespaces from the string “aaa bbb ccc ddd eee”?

1025


How can we get home directory using '~' in python?

951


Is anaconda the same as python?

815


Explain about multi threading on python?

825


How to sort a dictionary by value in python?

839


What is the use of dir() function?

948


How do I delete a file?

890


How do you create a dictionary which can preserve the order of pairs?

919


Is python case-sensitive?

1872


What is tuple in python?

943


What does echo do python?

825


What are the best sites to learn python?

941


Can you use bootstrap with python?

873


How to get the current time in python?

876