Python
Which meth ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
Which methods a class must implement in Python to be considered an iterator. Select all that apply
__iterable__
__iter__
__prev__
__next__
__current__
__get__
Explanation
Any object that we want to be called an iterator must implement following 2 methods: __iter__ (is called on initialization of an iterator) and __next__ (should return the next value for the iterable)
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
P
ython
Quiz
Login to learn Python
or
Read more about
Python Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
Python quizzes
Consider following code: $var = 1 + "-1.3e3"; echo $va...
Consider following code snippet: print_r("Hello World", t...
Consider following code snippet: $a = 3; $b = '3'; if ($a...
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment