课程
/后端开发
/Python
/python进阶
print filter(lambda s:s and len(s.strip()) > 0 ,['test', None, '', 'str', ' ', 'END'])
这个代码在python3中要怎么书写呢?
2019-05-29
源自:python进阶 2-10
正在回答
print(list(filter(lambda s: s and len(s.strip())>0,['test', None, '', 'str', ' ', 'END'])))
print(filter(lambda s: s and len(s.strip())>0,['test', None, '', 'str', ' ', 'END']))
举报
学习函数式、模块和面向对象编程,掌握Python高级程序设计
购课补贴联系客服咨询优惠详情
慕课网APP您的移动学习伙伴
扫描二维码关注慕课网微信公众号