About list derivation in Python

Why can the all function in the

list derivation be derived even if the object is not iterable?

all (.)

all(iterable) -> bool

Return True if bool(x) is True for all values x in the iterable.
If the iterable is empty, return True
   

Mar.21,2021

>>> import collections
>>> isinstance((y for y in range(1, 100)), collections.Iterable)
True
Menu