def delta(A,B,x):
    return (x in (A or B)) and not(x in (A and B))

A = "ABCDEFGHIJKLM"
B = "OKLM"

print(delta(A,B,"O"))
