Computer Science, asked by urooj123, 9 months ago

Write a program to copy contents of ABC.txt to XYZ.txt

Answers

Answered by markmadhukar03
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