为什么把返回的匿名函数放入filter中输出结果错误?
is_not_empty = lambda s: s and len(s.strip()) > 0
print filter(is_not_empty, ['test', None, '', 'str', ' ', 'END'])
is_not_empty = lambda s: s and len(s.strip()) > 0
print filter(is_not_empty, ['test', None, '', 'str', ' ', 'END'])
2019-01-24
举报