Python löschen Inhalt der Datei
f = open('file.txt', 'r+')
f.truncate(0)
Horrible Hornet
f = open('file.txt', 'r+')
f.truncate(0)
open('file.txt', 'w').close()
file = open("sample.txt","w")
file.close()