diff --git a/basics.py b/basics.py index 950f189..2ab166b 100644 --- a/basics.py +++ b/basics.py @@ -1,3 +1,4 @@ -with open("files/vegetables.txt", "w") as myfile: - myfile.write("Tomato\nCucumber\nOnion") - myfile.write("\nGarlic") \ No newline at end of file +with open("files/fruits.txt", "r") as myfile: + content = myfile.read(90) +with open("files/fruits-copy.txt", "w") as myfile: + myfile.write(content) \ No newline at end of file diff --git a/files/fruits-copy.txt b/files/fruits-copy.txt new file mode 100644 index 0000000..9e55d1b --- /dev/null +++ b/files/fruits-copy.txt @@ -0,0 +1,6 @@ +pear +apple +orange +mandarin +watermelon +pomegranate \ No newline at end of file