Comment vider un fichier texte dans 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()