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 / hr@tgksolutions.com

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

Why is python good for machine learning?

870


Which database is used in python?

904


Explain try, raise, and finally?

866


How web scraping is done in python, explain in short?

826


Tell me why and when do you use generators in python?

907


How to create dynamic array in python?

1024


How do you use isalpha in python?

964


Does every class need a constructor?

816


Where is the math.py (socket.py, regex.py, etc.) Source file?

937


Do you need python to run a python program?

831


What is the use of numpy package?

922


What is the difference between runtime and compile time?

934


Is there a switch..case statement in python?

891


How do I emulate os.kill() in windows?

976


Is python as powerful as c++?

815