Skip to main content

Program to copy the content of .jpg file into another file

· One min read
Kaustubh Kulkarni
Output
with open('download.jpg','rb') as firstfile, open('1.jpg','wb') as secondfile:
# read content from first file
for line in firstfile:
# append content to second file
secondfile.write(line)
print("file copied successfully")

output:

file.py
file copied successfully