python vrer un fichier texte

with open("test.txt", "w") as f: # gère close() automatiquement
    # traitement
Colorful Cormorant