I have two folders, and each folde contains 196 files, they all are in ('\xae\xae\xb4\x9e\x8f\x9f\xba\xc1\xd5\xbd\xcd\xa1\xb7\'
) format. I am trying to read this data convert it into human readable form. I want to combine the data of both the files of the 2 folder.
I tried this using ord()
function but while trying to retrive a single file with expected output, I am getting wrong values. I tries to extract first element of the read but output I am getting is forst value of all the files.
here is my code:
for file_name, files in izip(list_of_files, list_of_filesO):
fi = open(file_name,"r").read()
fo = open(files,"r").read()
f = [open("/home/vidula/Desktop/project/ori_tri/input_%i.data" %i,'w')for i in range(len(list_of_files))]
read = [ord(i) for i in fi]
reado = [ord(i) for i in fo]
zipped = zip (read,reado)
print read[0]
Expected output:
125,25
36,54
98,36
78,56
Thank you in anticipation.