I am writing some cryptographic algorithm using Python, but I have never worked with Python before.
First of all, look at this code then I\'d explain the issue,
In Python 3 zip returns an iterator, use list
to see its content:
>>> list(zip((1,2,3),(10,20,30),(100,200,300)))
[(1, 10, 100), (2, 20, 200), (3, 30, 300)]
c = [ i ^ j for i, j in zip( x, y ) ]
is a list comprehension, in this you're iterating over the items returned from zip
and doing some operation on them to create a new list.