def iflatten(x):
    """iflatten(sequence) -> iterator
    Similar to ``.flatten()``, but returns iterator instead"""
    for el in x:
        if _is_listlike(el):
            for el_ in flatten(el):
                yield el_
        else:
            yield el
iflatten(sequence) -> iterator
    Similar to ``.flatten()``, but returns iterator instead
stackoverflow/venv/lib/python3.6/site-packages/parsel/utils.py