code: def flatten(iterable):
      
      for el in iterable:
          if isinstance(el, collections.Iterable) and not isinstance(el, (str, bytes)):
              yield from flatten(el)
          else:
              yield el
docs: flat a iterable. https://stackoverflow.com/a/2158532