Python menghapus konten file
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()