from itertools import chain, izip_longest
sentinel = object()
return (x for x in chain(*izip_longest(fillvalue=sentinel, *iterables)) if x is not sentinel)
| Contact Us
© 2022 ActiveState Software Inc. All rights reserved.
ActiveState®, Komodo®, ActiveState Perl Dev Kit®,
ActiveState Tcl Dev Kit®, ActivePerl®, ActivePython®,
and ActiveTcl® are registered trademarks of ActiveState.
All other marks are property of their respective owners.