title: Printing a list separated with commas, without a trailing comma
body: <p>I am writing a piece of code that should output a list of items separated with a comma. The list is generated with a <code>for</code> loop:</p>
  <pre><code>for x in range(5):
      print(x, end=&quot;,&quot;)
  </code></pre>
  <p>The problem is I don't know how to get rid of the last comma that is added with the last entry in the list. It outputs this:</p>
  <pre><code>0,1,2,3,4,
  </code></pre>
  <p>How do I remove the ending <code>,</code>?</p>