Sep-30-2018, 01:36 PM
Bitwise operators come in handy here as you are looking for an exclusive or:
def in1to10(n, outside_mode=False): return (1 <= n <= 10) ^ outside_mode
I am trying to help you, really, even if it doesn't always seem that way