Last active
August 29, 2015 14:15
-
-
Save HirofumiYashima/d51da8fa15a10e78daab to your computer and use it in GitHub Desktop.
Python で、None を含む リスト の要素の総和を求める方法 ref: http://qiita.com/HirofumiYashima/items/bafa1acc074b8f4a9236
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
filter(None, [1,2,3,None]) | |
sum(filter(None, [1,2,3,None])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment