Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def lire (filename):
- t = open(filename ,"r")
- while 1:
- txt = t.readline()
- print(txt)
- if txt =='':
- break
- t.close()
- def write(filename):
- t = open(filename,"a")
- txt = t.write(Edit)
- t.close()
- fname = input("Quel fichier voulez-vous open ? --> ")
- NANI = input('Edition ou Lecture ?')
- if NANI == 'Edition':
- Edit = input("Que voulez-vous écrire ? : ")
- write(fname)
- while Edit != '':
- Edit = input("Que voulez-vous écrire ? : ")
- write(fname)
- elif NANI == "Lecture":
- lire(fname)
- else:
- print("Fonction inconnue ,vérifiez l'orthographe")
- OULAH = input("Pressez entrer pour sortir.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement