def flatten( iterables ):
    """ Flatten an iterable, except for string elements. """
    for it in iterables:
        if isinstance(it, str):
            yield it
        else:
            for element in it:
                yield element
def flatten ( iterables ) : for it in iterables : if isinstance ( it , str ) : yield it else : for element in it : yield element
Flatten an iterable, except for string elements.