Hi, I write some data to a file called original.txt in python, then i read the file original.txt ,convert watever in the file to string(str), then write it in another file called copy.txt. Now i want to read the copy.txt and output it in python itself. It does not display nothing.Why this?
rfile = open('original.txt', "r")
char=infile.read()
print"Text in file:",char
for i in char:
x=open('copy.txt','a')
x.write(str(i))
rfile1 = open('copy.txt', "r")
abc=infile.readlines()
print"Data in file copy:",abc