Hi. I have been happily running an old python script but have just had to reinstall on new PC...so guessing I am now on Python3 rather than 2. My scripts fails at the point I strip the line.
THis is a snippet of the python script that still works in an older version of geany:
input = open("hsbc.csv", "r")
lines = input.readlines()
output = open("hsbc1.csv", "w")
result = 
for line in lines:
line = re.sub('[,]', '', line)
print >> output, line.strip()
The error is noted at the 'print >> output.line.strip() line
Does anybody know how to convert the above script from Python2 to 3 so I can use it going forwards?
Thanks!... and you will guess I am no programmer!
I attach the file HSBC.csv