How to check variable against 2 possible values?

if s in ('a', 'b'):
    return 1
elif s in ('c', 'd'):
    return 2
else:
    return 3

Leave a Comment