Skip to content

Instantly share code, notes, and snippets.

@avalanchy
Created December 22, 2015 10:01
Show Gist options
  • Save avalanchy/3650e07795821e1626cd to your computer and use it in GitHub Desktop.
Save avalanchy/3650e07795821e1626cd to your computer and use it in GitHub Desktop.
for a, b, c in itertools.product([True, False], repeat=3):
print (a and (b or c)) is (a and b or c)
# True
# True
# True
# False
# True
# False
# True
# False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment