擅长:python、mysql、java
<p>尝试使用组群集习惯用法:</p>
<pre><code>zip(*[iter(L)]*2)
</code></pre>
<p>来自<a href="https://docs.python.org/2/library/functions.html" rel="noreferrer">https://docs.python.org/2/library/functions.html</a>:</p>
<blockquote>
<p>The left-to-right evaluation order of the iterables is guaranteed.
This makes possible an idiom for clustering a data series into
n-length groups using zip(*[iter(s)]*n).</p>
</blockquote>