Python Forum
Want to Save Print output in csv file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Want to Save Print output in csv file
#2
print() is a function. When you call the print() function it returns the value None. writerow(print()) will write None in the CSV file. If you want to print() a string and write the same string to a file you need to create the string, assign it to a variable, print the variable and write the variable to the file.
Reply


Messages In This Thread
Want to Save Print output in csv file - by Rasedul - Jan-11-2022, 02:50 PM
RE: Want to Save Print output in csv file - by deanhystad - Jan-11-2022, 03:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Cannot get cmd to print Python file Schauster 11 670 May-16-2024, 04:40 PM
Last Post: xMaxrayx
  Open/save file on Android frohr 0 434 Jan-24-2024, 06:28 PM
Last Post: frohr
  how to save to multiple locations during save cubangt 1 647 Oct-23-2023, 10:16 PM
Last Post: deanhystad
  save values permanently in python (perhaps not in a text file)? flash77 8 1,428 Jul-07-2023, 05:44 PM
Last Post: flash77
  Reading data from excel file –> process it >>then write to another excel output file Jennifer_Jone 0 1,239 Mar-14-2023, 07:59 PM
Last Post: Jennifer_Jone
  Save and Close Excel File avd88 0 3,421 Feb-20-2023, 07:19 PM
Last Post: avd88
  Python VS Code: using print command twice but not getting output from terminal kdx264 4 1,247 Jan-16-2023, 07:38 PM
Last Post: Skaperen
  Save multiple Parts of Bytearray to File ? lastyle 1 1,023 Dec-10-2022, 08:09 AM
Last Post: Gribouillis
  How to output one value per request of the CSV and print it in another func? Student44 3 1,484 Nov-11-2022, 10:45 PM
Last Post: snippsat
  Saving the print result in a text file Calli 8 2,036 Sep-25-2022, 06:38 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020