In Python the interface of an iterable is a subset of the iterator interface. This has the advantage that in many cases they can be treated in the same way. However, there is an
Because of Python's duck typing,
Any object is iterable if it defines the next() and __iter__() method returns itself.
next()
__iter__()
If the object itself doesnt have the next() method, the __iter__() can return any object, that has a next() method
You could refer this question to see Iterability in Python