I am currently having trouble out a method to save the results in the file I provided through my sys.argv[1]. I am providing a csv to the python script.
My csv has data in the format like this
3/4/20
3/5/20
3/6/20
I have tried using append() but I am receiving errors, I also attempted using write()
import sys
file = open(str(sys.argv[1])) #enter csv path name, make sure the file only contains the dates
for i in file:
addedstring = (i.rstrip() +',09,00, 17')
finalstring = addedstring.replace("20,", "2020,")
file.append(i)
Any help is greatly appreciated!