What does the "^" operator do in Python?

How can I find out about the purpose of the "^ " operator?

Author: titov_andrei, 2015-12-24

3 answers

How can I find out about the purpose of the "^ " operator?

help('^') in Python, it says that this is the "bitwise XOR (exclusive OR)" operator. help() helps you find the meaning of characters that are difficult to search for in the search engine, or helps you find out keywords that can be used for further search (it is also useful to view related topics found by the help() call).

help() it works not only for operators, for example, help('...'), help('symbols'), help('json'), help(help)...

 15
Author: jfs, 2017-05-23 12:39:08

This is the XOR operator. How to find out-type the phrase "%langname% operators"in Google.

 11
Author: Владимир Мартьянов, 2015-12-24 13:12:50

This is a bitwise Exclusive OR or XOR operator. Link to the documentation.

 9
Author: Jenyay, 2015-12-24 13:20:50