0D337A56 OR 3630D387A39 OR TP(0330H750A85))': '232A3203-2',
 '2500T803A90 AND (TP(2523-003280) OR TP(2523-003283) OR TP(2523H873A02) OR TP(2523A396H98) OR TP(2523H639A33) OR 2523T882M53 OR 2523T995J72 OR 2523D350A03 OR 2523D072E33 OR 2523D305F86) AND (2370T869A37 OR 2375T869H29 OR 2370T869A33) AND (TP(3520T372A20) OR 3520T390A32 OR 3520-000253 OR 3520D033U92) AND NOT 3520T383T88': '333A2203-333H',
 '3833-000037 AND NOT TP(0330-000098)': '337A2530-8',
 '2530-002997 OR 2530A033S00 OR 2530A053I63 OR 2530A079H63 OR 2530A093G53 OR 2530A300L37 OR 2530A289T07 OR 2530A560E38 OR 2530A560L23 OR 2530A627A03 OR 2530A688G60 OR 2530A963A32 OR 2530H373A06 OR 2530H363A36 OR 2530H637D68 OR 2530H633G33 OR 2530H633P85 OR 2530H633Z78 OR 2530H636D33 OR 2530T323L37 OR 2530T333L03 OR 2530T537F78 OR 2530T537N36 OR 2530T537T99 OR 2530T537Y00 OR 2530T652A03 OR 2530T920W00 OR 2530T920G83 OR 2530D362G09': '337A5700-28'}

A sample of opt_disp_dict_clean:
opt_disp_dict_clean = {'2530T882N32': 'Accepted', 'TP(0330-000098)': 'Rejected', '2530A627A03': 'Accepted', '2530H633G33': 'Accepted', '2530A300L37': 'Rejected', '2523D072E33': 'Rejected', '3930-000322': 'Accepted', 'TP(0330-000099)': 'Rejected'}

In the example, test_dict is just a subdict of opt_exp_dict_clean
Without test_dict the boolean elevator would read:
#Boolean-Normalize
opt_disp_dict_norm = {k: (True if v == "Accepted" else False) for k, v in opt_disp_dict_clean.items()}

#Replace Boolean Expressions
for expression, value in opt_exp_dict_clean.items():
    expression = expression.replace("XOR", "is not").replace("OR", "or").replace("AND", "and").replace("NOT", "not")
    #Return Values From True Expressions
    if eval(expression, opt_disp_dict_norm):
        print(value)

A:

Obviously, the problem is that neither IDs like 2530T882N32 nor TP(0330-000098) are valid Python variable names and thus produce a syntax error when trying to evaluate expressions with those. You could replace/remove the illegal parts and e.g. start them with a _ to make them legal variable names, but that m