title: List comprehension in format string? (Python)
body: <p>Let's say I have a list <code>datalist</code>, with <code>len(datalist) = 4</code>. Let's say I want each of the elements in the list to be represented in a string in this way:</p>
  
  <pre><code>s = "'{0}'::'{1}'::'{2}' '{3}'\n".format(datalist[0], datalist[1], datalist[2], datalist[3])
  </code></pre>
  
  <p>I don't like having to type <code>datalist[index]</code> so many times, and feel like there should be a more effective way. I tried:</p>
  
  <pre><code>s = "'{0}'::'{1}'::'{2}' '{3}'\n".format(datalist[i] for i in range(4))
  </code></pre>
  
  <p>But this doesn't work:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  IndexError: tuple index out of range
  </code></pre>
  
  <p>Does anybody know a functioning way to achieve this efficiently and concisely?</p>