Python替换掉列表的 和空格

test = ['', 'ttt
          ', "123"]
test = [x.strip() for x in test if x.strip() != '']
print(test)
原文地址:https://www.cnblogs.com/D-arling/p/14715827.html