Need to disable Sympy output of 'False' (0, False) in logical operator 'not'
If you use the operators &, |, and ~ for and, or, and not, respectively, you will get a symbolic boolean expression. I also recommend using sympy.true and sympy.false instead of 1 and 0.
I am using Sympy to process randomly generated expressions which may contain the boolean operators 'and', 'or', and 'not'.
'and' and 'or' work well:

a = 0
b = 1
a and b

0

a or b

1
But 'not' introduces a 2nd term 'False' in addition to the desired value:

a, not b

(0, False)
When processed by Sympy (where 'data' (below) provides realworld values to substitute for the variables a and b):

algo_raw = 'a, not b'
algo_sym = sympy.sympify(algo_raw)
algo_sym.subs(data)

It chokes on 'False'.
I need to disable the 2nd term 'False' such that I get only the desired output '0'.