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:
|
with open("files/fruits.txt", "a+") as myfile:
|
||||||
content = myfile.read(90)
|
myfile.write("\nOkra")
|
||||||
with open("files/fruits-copy.txt", "w") as myfile:
|
myfile.seek(0)
|
||||||
myfile.write(content)
|
content = myfile.read()
|
||||||
|
|
||||||
|
print(content)
|
||||||
|
@ -3,4 +3,5 @@ apple
|
|||||||
orange
|
orange
|
||||||
mandarin
|
mandarin
|
||||||
watermelon
|
watermelon
|
||||||
pomegranate
|
pomegranate
|
||||||
|
Okra
|
Loading…
Reference in New Issue
Block a user