SyntaxFix
Write A Post
Hire A Developer
Questions
Xor is ^ in Python. It returns :
^
__xor__
If you intend to use them on strings anyway, casting them in bool makes your operation unambiguous (you could also mean set(str1) ^ set(str2)).
bool
set(str1) ^ set(str2)