Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which method of the iterable object returns an iterator object for the collection?

a) iterator()
b) _iterator_()
c) _iteration_()
d) _return_iterator_()

Answer: b
Explanation: An iterable object represents a collection of values that can be iterated. An iterable object must define a method named __iterator__() (with two underscores at the start and end of the name) which returns an iterator object for the collection.

Join The Discussion