How do I do this in Python (File Manipulation)?
- by ThinkCode
I have a bunch of HTML files in HTML folder. Those HTML files have unicode characters which I solved by using filter(lambda x: x in string.printable, line). Now how do I write the changes back to the original file? What is the best way of doing it? Each HTML file is of 30 kb in size.
1 import os, string
2
3 for file in os.listdir("HTML/"):
…