title: Python: How to convert below for loop output into a list?
body: <p>I am new to python, sorry for the entry level question
  I want to save below result into a list.</p>
  
  <pre><code>for i in range(true_k):
      print("Cluster %d:" % i),
      for ind in centroid[i, :5]:
          print(' %s' % terms[ind])
  </code></pre>