title: Python: Assign print output to a variable
body: <p>I would like to know how to assign the output of the <code>print</code> function (or any function) to a variable. To give an example:</p>
  
  <pre><code>import eyeD3
  tag = eyeD3.Tag()
  tag.link("/some/file.mp3")
  print tag.getArtist()
  </code></pre>
  
  <p>How do I assign the output of <code>print tag.getArtist</code> to a variable?</p>