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