Python - Magic Methods and Operator Overloading
Which of the following is the correct way to define an iterator class in Python?
__iter__ returning self and __next__ to get next item.__iter__ and __next__ methods.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions