Recursive function calls in python in list comprehension gives different result than assigning the result of the call to a variable first
<p>Why doesn't this:</p>

<pre><code>def subsets(x):
    if not x:
        return [[]]
    else:
        return [x + y for x in [[], [x[0]]] for y in subsets(x[1:])]

print subsets(['a', 'b'])
</code></pre>

<p>produce the same output as this:</p>

<pre><code>def subsets(x):
    if not x:
        return [[]]
    else:
        z = subsets(x[1:])
        return [x + y for x in [[], [x[0]]] for y in z]

print subsets(['a', 'b'])
</code></pre>
