I am checking wether one of two conditions applies and only one.
My question is if there is a way to have a single if statement to do this:
if x == True:
if y == False:
do_something()
elif x == False:
if y == True:
do_something()
Ideally similar to how and
and or
work so that it would something like:
enter code here
if x == True ° y == True:
do_something()
whereas °
is the wanted operator
- do nothing if: x,y = True or x,y = False
- do something if: x = True and y = False or x = False and y = True
I would appreciate any advice if this is not possible.
Thank you in advance!!