Skip to content

Instantly share code, notes, and snippets.

@wrboyce
Created October 7, 2011 09:59
Show Gist options
  • Select an option

  • Save wrboyce/1269942 to your computer and use it in GitHub Desktop.

Select an option

Save wrboyce/1269942 to your computer and use it in GitHub Desktop.
>>> def f1(): print 'f1'; return True
...
>>> def f2(): print 'f2'; return True
...
>>> f1() & f2()
f1
f2
True
>>> f1() and f2()
f1
f2
True
@caius
Copy link

caius commented Oct 7, 2011

>>> def f1(): print 'f1'; return False
... 
>>> def f2(): print 'f2'; return True
... 
>>> f1() & f2()
f1
f2
False
>>> f1() and f2()
f1
False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment