I once got asked in an interview question what the following code does in Python:
a = a^b
b = b^a
a = a^b
I found it weird… It was a multiple choice question and my intuition said that this thing swapped the values of the variables (at least I was not mistaken). So I investigated further and now I explain it in my YouTube channel:
Top comments (1)
What a lazy interviewer. You should never see this in Python.