I am attempting to remove instances of a character from a txt file with python using the following code:
import fileinput for line in fileinput.FileInput("test.txt",inplace=1): line = line.replace("^M","") print line
and get the following error:
File "par.py", line 6
line = line.replace("
SyntaxError: EOL while scanning string literal
I am new to python and need assistance. Thank you!