Closed oucb closed 8 years ago
感谢 @oucb 的建议, 这里确实不需要转换成list,去掉后看起来更简明清晰
原著里是这样,我觉得我们可以先于原著改进下,然后再给原著提过去
你来提个PR不? :) 看看要不要顺便对filter稍微多解释一句
filter(function or None, sequence) -> list, tuple, or string
Return those items of sequence for which function(item) is true. If function is None, return the items that are true. If sequence is a tuple or string, return the same type, else return a list.
已提PR。调整了下解释~@suqi
filter本身会生成一个列表,是否可以去掉
list