Q:

Write python program to copy one file to another

0

Write a program to copy one file to another

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import os

os.chdir("c:/ahmedfiles")
file1=open("file1.txt","r")
file2=open("file2.txt","w+")
file2.write(file1.read())
file1.close()
file2.close()
print("File Copied...")

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

<< Write python program to read a file and display it...