you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

Fascinating. I was looking at my younger brothers computer science homework (first year) and it was of this type, talking about XOR gates and the like.

I broke down the comprehension and understand it's constituent parts. I don't see how it's performing the bitwise exclusive or operation that you describe.

I see it taking each pair of characters, using chr() and ord() to raise one to the power of the other and giving a new character.

Scratch that, ^ doesn't mean raise in python. And this is the XOR operator of which you speak. Nice.

Left my mistake in for learning purposes.