Answer to Question #231128 in Python for Rachna Pal

Question #231128

write a python function which create a copy of the file poem.txt as poemrev.txt. this new file contain the data form last word to fist word from the file poem.txt.


1
Expert's answer
2021-09-04T00:34:25-0400
from shutil import copyfile
file1 = open('poem.txt','w')
file1.write('Python is a good programming language')
copyfile('poem.txt','poemrev.txt')
file3 = open('poemrev.txt','r')
file3.read()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS