Lesson 77
This commit is contained in:
parent
f23d88b6fd
commit
a25216b4ba
10
basics.py
10
basics.py
@ -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)
|
||||
|
@ -3,4 +3,5 @@ apple
|
||||
orange
|
||||
mandarin
|
||||
watermelon
|
||||
pomegranate
|
||||
pomegranate
|
||||
Okra
|
Loading…
Reference in New Issue
Block a user