List vs generator comprehension speed with join function : <p>So I got these examples from the official documentation. 
<a href="https://docs.python.org/2/library/timeit.html" rel="noreferrer">https://docs.python.org/2/library/timeit.html</a></p>

<p>What exactly makes the first example (generator expression) slower than the second (list comprehension)?</p>

<pre><code>&gt;&gt;&gt; timeit.timeit('"-".join(str(n) for n in range(100))', number=10000)
0.8187260627746582
&gt;&gt;&gt; timeit.timeit('"-".join([str(n) for n in range(100)])', number=10000)
0.7288308143615723
</code></pre>
