In my utf-8 encoded file, there are curly quotes (“”).
How do I replace them all with normal quotes (")?
cell_info.replace('“','"')
cell_info.replace('”','"')
did not work. No error message.
Thank you. :)
In my utf-8 encoded file, there are curly quotes (“”).
How do I replace them all with normal quotes (")?
cell_info.replace('“','"')
cell_info.replace('”','"')
did not work. No error message.
Thank you. :)
str.replace()
doesn't replace the original string, it just returns a new one.
Do:
cell_info = cell_info.replace('“','"').replace('”','"')
cell_info = cell_info.replace('“','"').replace('”','"')
The replace method return a new string with the replacement done. It doesn't act directly on the string.