python中的数据过滤
1.使用filter函数In [1]: from random import randint
In [2]: data = [randint(-10,10) for _ in xrange(10)]
In [3]: data
Out[3]: [10, -4, 8, -10, 2, 5, -1, 2, -9, 0]
In [4]: filter?
Docstring:
filter(funct...
原创
2018-03-06 12:04:14 ·
1782 阅读 ·
0 评论