擅长:python、mysql、java
<p>来自<a href="http://docs.python.org/reference/expressions.html#list-displays">list displays</a>文档:</p>
<blockquote>
<p>When a list comprehension is supplied, it consists of a single expression followed by at least one <code>for</code> clause and zero or more <code>for</code> or <code>if</code> clauses. In this case, the elements of the new list are those that would be produced by considering each of the <code>for</code> or <code>if</code> clauses a block, nesting from left to right, and evaluating the expression to produce a list element each time the innermost block is reached.</p>
</blockquote>
<p>因此,您的表达式可以重写为:</p>
<pre><code>thingys = []
for y in l:
for x in y:
thingys.append(x)
</code></pre>