title: Save Print output in csv file
body: <p>I want to save this print output to CSV file but this code is not working, how can I save this output to CSV?</p>
  <pre><code>import csv
  
  for x in range(2000, 3000):
      print('hi', x, sep='')
  
  f = open('op2.csv', 'w')
  writer = csv.writer(f)
  writer.writerow(print())
  f.close()
  </code></pre>
  <p>I want to save on CSV like this</p>
  <pre><code>hi2000
  hi2001
  hi2002
  </code></pre>