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