Computer Science, asked by kanchanranno, 1 month ago

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 Anonymous
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