title: Use str.join with generator expression in python
body: <p>When I read the question <a href="https://stackoverflow.com/questions/497765/python-string-joinlist-on-object-array-rather-than-string-array">Python string.join(list) on object array rather than string array</a>, I find the following sentence:</p>
  
  <pre><code>', '.join(str(x) for x in list)
  </code></pre>
  
  <p>I have already know about <code>(str(x) for x in list)</code> is a generator expression, I also know generator is an iterable.  The following code verify the correctness of my view.</p>
  
  <pre><code>&gt;&gt;&gt; gen = (x for x in [1,2,3])
  &lt;generator object &lt;genexpr&gt; at 0x104349b40&gt;
  &gt;&gt;&gt; from collections import Iterable
  &gt;&gt;&gt; isinstance(gen, Iterable)
  True
  </code></pre>
  
  <p>At the same time, <code>str.join(iterable)</code> return a string which is the concatenation of the strings in the iterable. So the following works fine as I wish.</p>
  
  <pre><code>&gt;&gt;&gt; ",".join((str(x) for x in [1,2,3]))
  '123'
  </code></pre>
  
  <p>Then here comes the question, why the code works fine too at bellow, why don't need a parentheses in the function call.</p>
  
  <pre><code>', '.join(str(x) for x in [1,2,3])
  </code></pre>
  
  <p>After all,  <code>str(x) for x in [1,2,3]</code> itself is not a generator.</p>
  
  <pre><code>&gt;&gt;&gt; tmp = str(x) for x in [1,2,3]
    File "&lt;stdin&gt;", line 1
      tmp = str(x) for x in [1,2,3]
                     ^
  SyntaxError: invalid syntax
  </code></pre>