Computer Science, asked by scgchjvm2m, 3 days ago

“Roma” is a leading manufacturer of footwear in the City. The Company ships their products to various dealers across the world through Gaaty Shipments, the trusted brand in the logistics industry. It is customary for the footwear Company to prepare a list of their products to be shipped for that week, in a text file and send a copy of it across to Gaaty Shipments.

In connection with this, the footwear company’s Manager intended to create a copy of this text file which contains all the product details to be shipped as
"Product - Product ID".
Help him by writing a program to copy the content from one file to another file.

For example, if the content of file_in.txt is
Aerosol - 38
Churn - 50
Plank - 55
Slipsheet - 75
Jerrican - 950
Girder - 100

the same should be copied to file_out.txt.

Input and Output Format :
Refer sample input and output for formatting specifications.

Sample Input :
No Input.
Read the content from file (file name) : file_in.txt. The file is already been available in the platform

Sample Output :
In output file, the content will be copied.
Write the content to the output file (file name) : file_out.txt and display it.

Example:

Aerosol - 38
Churn - 50
Plank - 55
Slipsheet - 75
Jerrican - 950
Girder - 100

Answers

Answered by YodhaTheFighter
1

Answer:

f1=open('file_in.txt','r')

f2=open('file_out.txt','a')

for line in f1:

   f2.write(line)

f1.close()

f2.close()

f=open("file_out.txt","r")

print(f.read())

Explanation:

Similar questions