I want to delete everything from my html file and add <!DOCTYPE html><html><body>
.
Here is my code so far:
with open('table.html', 'w'): pass
table_file = open('table.html', 'w')
table_file.write('<!DOCTYPE html><html><body>')
After i run my code, table.html
is now empty. Why?
How can I fix that?