Skip to content

Instantly share code, notes, and snippets.

@finnigja
Created November 22, 2016 17:54
Show Gist options
  • Save finnigja/c8ca5e0cff5e64a202dce3b8e4f43df6 to your computer and use it in GitHub Desktop.
Save finnigja/c8ca5e0cff5e64a202dce3b8e4f43df6 to your computer and use it in GitHub Desktop.
>>> for x in [True, False]:
... for y in [True, False]:
... print('{0} or {1} = {2}'.format(x, y, x or y))
...
True or True = True
True or False = True
False or True = True
False or False = False
>>> for x in [True, False]:
... for y in [True, False]:
... print('{0} and {1} = {2}'.format(x, y, x and y))
...
True and True = True
True and False = False
False and True = False
False and False = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment