On 2015-05-28 23:50, Skybuck Flying wrote: > A = input > B = input > C = output > > A B C: > ------- > F F T > F T F > T F T > T T T > > Surpisingly enough I don't think there is a casual/common operator > for this thruth table. > > AND does not apply. > OR does not apply. > XOR does not apply.
Sounds like you want "a or not b" >>> print("\n".join("A=%s B=%s: %s" % (a, b, a or not b) for a in (True, False) >>> for b in (True, False))) A=True B=True: True A=True B=False: True A=False B=True: False A=False B=False: True -tkc -- https://mail.python.org/mailman/listinfo/python-list