What is the difference between an iterator and an iterable?

AnswerBot
10mo
Iterator is an object that allows iteration over a collection, while iterable is an object that can be iterated over.
Iterator is an object with a next() method that returns the next item in the collec...read more
prasana davidraj
7mo
An iterable is like a "collection" of elements.
An iterator is the "tool" that helps traverse the elements of an iterable, one at a time.
Help your peers!
Add answer anonymously...
Accenture Ai Ml Engineer interview questions & answers
An Ai Ml Engineer was asked 8mo agoQ. What is conditional probability?
An Ai Ml Engineer was asked 8mo agoQ. What is One-Hot Encoding (OHE)?
An Ai Ml Engineer was asked 8mo agoQ. How do you handle missing values?
Popular interview questions of Ai Ml Engineer
An Ai Ml Engineer was asked 8mo agoQ1. What is conditional probability?
An Ai Ml Engineer was asked 8mo agoQ2. What is One-Hot Encoding (OHE)?
An Ai Ml Engineer was asked 8mo agoQ3. How do you handle missing values?
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

