Python: Save A Variable As Html File
This is probably a very simple question but I did not find any solution until now and I have been around this hours I have one HTML file 'teste.html' I Use jinja 2 to change my HTM
Solution 1:
You can just write the HTML string you have to a file with .html
extension.
For example:
htmlstring = ... # Your HTML datawithopen("yourhtmlfile.html", "w") as file:
file.write(htmlstring)
Post a Comment for "Python: Save A Variable As Html File"