title: Python list printing (formatting)
body: <p>Having a list:</p>
  
  <pre><code>x=['s',2,'3',4,5,6]
  </code></pre>
  
  <p>I can print it like this:</p>
  
  <pre><code>for i in x:
          print i
  </code></pre>
  
  <p>However, as I've found out, it's a bit faster to just use one print statement, like this (below is how I got to this point):</p>
  
  <pre><code>print "\n".join( i.__class__==string and i or str(i) for i in x )
  </code></pre>
  
  <p><em><strong>Given that I want to use the second option and that I would like the output to be something like (I would also like to include a counter):
  <code>v1: s v2: 2 v3: 3 etc</code></em></strong> </p>
  
  <p>Here is what I've tried:</p>
  
  <p><strong>1)</strong></p>
  
  <pre><code>count=0
  print (("v"+str(++count)).join(":%s "% i for i in x  ) )
  </code></pre>
  
  <p>result is:<code>:s, v0:2, v0:3, v0:4, v0:5, v0:6,</code>  Really not what I'm aiming for.</p>
  
  <p>a) str(++count) prints nothing, count++ gives synthax error</p>
  
  <p>b) first <code>v</code> is nowhere to be found, since <code>join</code> in this case adds separators and there is no need for the first element</p>
  
  <p><strong>2)</strong></p>
  
  <pre><code>print ( ["v"+str(++count)+ ":%s, "% i for i in x ] )
  </code></pre>
  
  <p>Gives <code>['v0:s, ', 'v0:2, ', 'v0:3, ', 'v0:4, ', 'v0:5, ', 'v0:6, ']</code> Better, but still no <code>counter</code> and I don't want the <code>[]</code> being shown</p>
  
  <p><strong>3)</strong>
  Scratch all and restart:</p>
  
  <pre><code>print ",".join(i  for i in x ) 
  </code></pre>
  
  <p>cannot concatenate <code>string</code> and <code>int</code> so it becomes:</p>
  
  <pre><code>print ",".join(i.__class__==string and i or str(i)  for i in x )
  </code></pre>
  
  <p>which gives:</p>
  
  <pre><code>s,2,3,4,5,6
  </code></pre>
  
  <p><strong>And here is where I'm stuck.</strong></p>