-2

I wrote a python script that has a lot of data prints to the user. I now need to save all of the print statements to a single txt/csv file.

I wonder what is the fastest and most efficient way to achieve this. I could do this for each row at the time but prefer to this once for the entire script.

1 Answers1

0

You can redirect the output:

Python script.py > file.csv

Jason Kary
  • 93
  • 4