标签:gpo class http png pytho python src 过滤器 log
s = [‘123‘, ‘‘, ‘\t‘, ‘\n‘, ‘qweq‘]
将s里面的‘‘,‘\t‘,‘\n‘去掉:
filter(str.strip,s)
输出结果:
注意:这里得是python2
python2中过滤器 filter的使用
原文地址:https://www.cnblogs.com/fh-fendou/p/8478970.html