def chain_from_iterable(iterables):
 for it in iterables:
  for element in it:
   (yield element)

def chain_from_iterable ( iterables ) : for it in iterables : for element in it : ( yield element )
alternate constructor for chain() .