Iterables in Python

Get details on iterating a sequence in Python.

What is iterable?

Any object from which the iter built-in function can acquire an iterator is called iterable.

All sequences are iterable.

💡 Python obtains iterators from iterables.

Mostly, we iterate via a for loop. For example:

Press + to interact
message = 'Hello'
for letter in message:
print(letter)

It will ...