Skip to content

Instantly share code, notes, and snippets.

@briancline
Created December 5, 2013 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save briancline/7808355 to your computer and use it in GitHub Desktop.
Save briancline/7808355 to your computer and use it in GitHub Desktop.
wat
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