Skip to content

Instantly share code, notes, and snippets.

@cou929
Created December 9, 2012 03:42
Show Gist options
  • Save cou929/4243242 to your computer and use it in GitHub Desktop.
Save cou929/4243242 to your computer and use it in GitHub Desktop.
python での空配列の真偽値確認
$ python -c 'print 1 if [] else 0'
0
$ python -c 'print 1 if [1] else 0'
1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment