diff --git a/Scripting/Python/Manip-donnees.html b/Scripting/Python/Manip-donnees.html index d1ca9d8..e772d7a 100644 --- a/Scripting/Python/Manip-donnees.html +++ b/Scripting/Python/Manip-donnees.html @@ -2,7 +2,7 @@ title: Python - Manipulation des données description: published: true -date: 2021-11-17T10:28:57.180Z +date: 2021-11-17T10:37:48.278Z tags: editor: ckeditor dateCreated: 2021-06-07T08:01:47.026Z @@ -215,7 +215,7 @@ ligne 3
with open('test.txt','r') as file:
     print(file.read().splitlines())
 
-['banane', 'fraise', 'chocolat'] #Les \n indiquent des retours à la ligne
+['banane', 'fraise', 'chocolat']

Enfin, pour écrire dans un fichier texte, on utilise write().

with open('test.txt','a') as file:
     file.write("\nligne 4")