XORing two lists

Boris Genz boris_genz at hotmail.com
Wed Feb 19 00:10:46 CET 2003

Hello Guys...
I am making my second ( hehe, yeah second, I'm a real newb, but I'm trying
really hard ) python program and I have small problems. I have two text
files, in each I have a list ( of numbers ) written ( with pickle command,
because I want it to be a list after saving it to file and loading it back
to program )... What I want for my program to do is to read the
information from both text files, retreive the lists from them, and make
XOR operation with each number from my list. So for example, in file
test1.txt I have a following list: [1234, 65477, 44412, 2214]
and in the second file called test2.txt I have something like this:
[78974, 2221, 4447]
I want to get a list with following numbers ( I XORed each pair of the
numbers manually. The last number is the same, because it doesn't have its
pair ): 
Can you tell me how to do this...
I would really appreciate your help.
Thanks in advance.

More information about the Python-list mailing list