cara mengosongkan file teks dalam python
file = open("sample.txt","r+")
file.truncate(0)
file.close()
Galvik Codex
file = open("sample.txt","r+")
file.truncate(0)
file.close()
open('file.txt', 'w').close()