Created
December 5, 2013 16:19
-
-
Save briancline/7808355 to your computer and use it in GitHub Desktop.
wat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bc:~/dev/openstack/glance% python | |
Python 2.7.5+ (default, Sep 17 2013, 15:31:50) | |
[GCC 4.8.1] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> print 'nonempty' if ('') else 'empty' | |
empty | |
>>> print 'nonempty' if ('', '') else 'empty' | |
nonempty | |
>>> print 'nonempty' if all(('', '')) else 'empty' | |
empty | |
>>> print 'nonempty' if all(('')) else 'empty' | |
nonempty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment