Farz0l1x

Untitled

Mar 3rd, 2023
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. from itertools import *
  2. def f(x, y, z):
  3.     return ((not(x)) and y and z) or ((not(x)) and (not(y)) and z) or ((not(x)) and (not(y)) and (not(z)))
  4. table = [(0, 0, 0), (1, 0, 0), (1, 0, 1)]
  5. for p in permutations('xyz'):
  6.     if [f(**dict(zip(p, r))) for r in table] == [1, 1, 1]:
  7.         print(p)
Advertisement
Add Comment
Please, Sign In to add comment