python 数组过滤

arr = [1,2,3,4,5,6,7,8,None]

arr = [elem for elem in arr if elem != None]
posted @ 2016-12-07 10:42  夜未央丿  阅读(6165)  评论(0编辑  收藏  举报