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.
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()
Comments
Leave a comment