擅长:python、mysql、java
<p>列表(循环('ABC','D','EF'))</p>
<p><strong>输出:</strong>['A'、'D'、'E'、'B'、'F'、'C']</p>
<pre><code>from itertools import chain, izip_longest
def roundrobin(*iterables):
sentinel = object()
return (x for x in chain(*izip_longest(fillvalue=sentinel, *iterables)) if x is not sentinel)
</code></pre>