Coding exercise 48

This commit is contained in:
David Avery 2020-02-05 14:22:58 +00:00
parent df89ccada0
commit f23d88b6fd
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,4 @@
with open("files/vegetables.txt", "w") as myfile:
myfile.write("Tomato\nCucumber\nOnion")
myfile.write("\nGarlic")
with open("files/fruits.txt", "r") as myfile:
content = myfile.read(90)
with open("files/fruits-copy.txt", "w") as myfile:
myfile.write(content)

6
files/fruits-copy.txt Normal file
View File

@ -0,0 +1,6 @@
pear
apple
orange
mandarin
watermelon
pomegranate