Write a program to copy contents of ABC.txt to XYZ.txt
Answers
Answered by
2
Answer:
code language: python 3
Explanation:
file_handle = open('ABC.txt', 'r')
contents = []
for line in file_handle:
contents.append(line)
file_handle.close()
file_handle2 = open('XYZ.txt', 'a')
for line in contents:
file_handle2.write(line)
file_handle2.close()
Similar questions