filter map vs list comprehension
<p>Is filter/map equivalent to list comprehension?
Suppose I have the following function</p>

<pre><code>def fib_gen():
    a,b = 0,1
    yield 0
    yield 1
    while True:
        a,b = b,a+b
        yield b
</code></pre>

<p>Now I can use list comprehension to list fib numbers:</p>

<pre><code>a = fib_gen()
print [a.next() for i in range(int(sys.argv[1]))]
</code></pre>

<p>Suppose I want to list only even fib numbers. I would do the following with filter/map:</p>

<pre><code>a = fib_gen()
print filter(even, map(lambda x: a.next(), range(int(sys.argv[1]))))
</code></pre>

<p>How can I get the same result with list comprehension?</p>
