()
Module : io
Écrit une chaîne dans un fichier.
📝 Syntaxe
file.write(s)💡 Exemples
with open('fichier.txt', 'w') as f: f.write('Bonjour')→ Écrit 'Bonjour' dans le fichier
Module : io
Écrit une chaîne dans un fichier.
file.write(s)with open('fichier.txt', 'w') as f: f.write('Bonjour')→ Écrit 'Bonjour' dans le fichier
