Python filter sorted

原创转载请注明出处:http://agilestyle.iteye.com/blog/2330331   Python内置的filter()函数用于过滤序列 过滤偶数 def is_odd(n): return n % 2 == 1 # [1, 3, 5, 7, 9] print(list(filter(is_odd, list(range(1, 10))))) 过滤空字符串 def
相关文章
相关标签/搜索