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

How to iterate through two lists in parallel?

935


Is python an oops?

870


How does Python’s list.sort work at a high level? Is it stable? What’s the runtime?

827


Can we write else statement try block in python?

911


What's the difference between python and anaconda programming?

954


Which server is used for python?

853


Name few python shells?

839


What are the rules for legal python names?

956


Mention the use of the split function in Python?

855


How do you write a range in python?

824


Does python have encapsulation?

852


Can you hack with python?

859


What are the generator functions in python?

1056


What is the output of the below code?

902


How would you randomize the contents of a list in-place?

853