About 41,600 results
Open links in new tab
  1. How do you get the logical xor of two variables in Python?

    Apr 30, 2017 · The xor operator on two booleans is logical xor (unlike on ints, where it's bitwise). Which makes sense, since bool is just a subclass of int, but is implemented to only have the …

  2. python - What does the caret (^) operator do? - Stack Overflow

    Side note, seeing as Python defines this as an xor operation and the method name has "xor" in it, I would consider it a poor design choice to make that method do something not related to xor …

  3. math - What does the ^ (XOR) operator do? - Stack Overflow

    Mar 6, 2021 · How XOR works with Negative Numbers : Since this question is also tagged as python, I will be answering it with that in mind. The XOR ( ^ ) is an logical operator that will …

  4. How to XOR two strings in Python - Stack Overflow

    Mar 27, 2016 · H, I'm trying to XOR two strings (which should become hex first) in Python. I know one way will work:

  5. python - Bitwise operation and usage - Stack Overflow

    Nov 17, 2009 · I don't know about python, but in lower level languages like C or even lower - assembly, bitwise shift is way much more efficient. To see the difference, you can write a …

  6. ^= operator in Python - Stack Overflow

    Nov 26, 2018 · For some reason, the python docs don't list ^= in the assignment operators reference.

  7. XOR Python Text Encryption/Decryption - Stack Overflow

    Dec 13, 2013 · How is your private key represented in Python? Integer, string of bytes, something else? Ultimately you're looking at the ^ operator for bitwise XOR but you need to make sure …

  8. XOR on two lists in Python - Stack Overflow

    Mar 30, 2014 · There's the XOR operator on set. Assuming you have no duplicates (and you don't care about checking if an element appears more than 1 times or not in the second list), you …

  9. encryption - byte operations (XOR) in python - Stack Overflow

    Apr 2, 2015 · byte operations (XOR) in python Asked 10 years, 8 months ago Modified 3 years, 4 months ago Viewed 129k times

  10. python - XOR (a,b) for integers - Stack Overflow

    Nov 24, 2014 · Give the Python function XOR (a,b) that returns the XOR (a,b) where a and b are integers. Submit a complete Python program that uses XOR in file xor.py This is confusing to …