What is iterator??? (Python)

preview_player
Показать описание
In this video we will learn how to define and work with iterator objects in python.

Points covered in this tutorial is following:
1. An iterator is an object that contains a countable number of values
2. In Python an Iterator is an object which implements the iterator protocol,
It consist of the methods __iter__() and __next__()

The for loop actually creates an iterator object and executes the next() method for each loop.

@vintagetutorials92
#iterator #objects #__iter__() #__next__() #iter #next #forloop #init # #function #methods #objects #arguments #interview #interviewquestions #pythontutorial #python #learnpython #datatype #pythondatastructures #pythondatatypes #data #dataanalyticswithpython #datascience

Kindly follow my channel for more such videos:
@vintagetutorials92
Рекомендации по теме
welcome to shbcf.ru