Lesson 77

This commit is contained in:
David Avery 2020-02-13 17:02:31 +00:00
parent f23d88b6fd
commit a25216b4ba
2 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,6 @@
with open("files/fruits.txt", "r") as myfile:
content = myfile.read(90)
with open("files/fruits-copy.txt", "w") as myfile:
myfile.write(content)
with open("files/fruits.txt", "a+") as myfile:
myfile.write("\nOkra")
myfile.seek(0)
content = myfile.read()
print(content)

View File

@ -4,3 +4,4 @@ orange
mandarin
watermelon
pomegranate
Okra