+ 1
What is meaning of iterable?and how list and tuple are iterable?
3 Answers
+ 2
Iterating means going from element to element.
Imagine you're standing in front of a sorted bookshelf you pull out one book after another, from A to Z.
You can also only pull out every second book etc, but as long as you can go through each book from the beginning to the end in a straight line, it means that the bookshelf is iterable.
+ 1
Type is iterable if you can iterate through its instance with a `for` loop. Most python collection types are iterable: lists, tuples, strings, dicts, sets, etc.
0
Chris thankyou very much