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 / 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


Please Help Members By Posting Answers For Below Questions

What is a namespace in python?

827


Should I learn python or scala?

848


How will you verify different flags at once?

837


What is a raw input?

815


Where is freeze for windows?

947


Can we override a constructor?

828


Why should we hire you examples?

820


When does dictionary is used instead of a list in python?

852


What are classes in python?

764


how do I pass a variable by reference?

796


Explain me what is a built-in function that python uses to iterate over a number sequence?

797


What will be the output of the code:def foo (i=[])?

814


What are the built-in types available in python?

772


Is python duck typed?

806


List some pdb commands.

861