Quiz 5
Quiz 5
File handling
words = line.split()
print(words[0]) with open("cities.txt", "r") as file:
lines = file.readlines()
Task 2:
with open("words.txt", "w") as file:
file.write(" Apple \n Banana\n Cherry ")