for i, element in enumerate(collection):
    if isinstance(element, Iterable) and not isinstance(element, str):
        pass
In Python, how do you return a list of indexes for an arbitarily nested element?