write a python program to create and read the city.txt file in one
go and print the contents on the output screen.
Answers
Answered by
9
Answer:
file = 'city.txt'
open(file, 'a').close()
f = open('city.txt')
f.write('some cities:-Delhi,Chandigarh etc.')
print(f.read())
Explanation:
pls upvote
Similar questions
Computer Science,
17 days ago
Math,
17 days ago
Math,
17 days ago
Math,
1 month ago
English,
1 month ago
Chemistry,
8 months ago
Hindi,
8 months ago
Political Science,
8 months ago