I have a text file which has quotations in the form '
and "
. This text file is of the form.
"string1", "string2", 'string3', 'string4', ''string5'', etc.
How can I remove all of the quotations '
and "
while leaving the rest of the file the way it is now?
I suspect it should be something like this:
with open('input.txt', 'r') as f, open('output.txt', 'w') as fo:
for line in f:
fo.write(line.strip())
Where line.strip()
somehow strips the strings of the quotation marks. Is anything else required?