我可以帮我处理这段代码吗,现在我得到的“test2”与“test”一样,如果我测试的是字符串,它运行良好,但作为列表,它无法正常工作
punc = set(string.punctuation)
test=[" course content good though textbook badly written.not got energy
though seems good union.it distance course i'm sure facilities.n/an/ain
last year offer poor terms academic personal. seems un become overwhelmed trying become run"]
test2 = ''.join(w for w in test if w not in punc)
print(test2)
我想删除所有标点符号
qq_遁去的一_1
相关分类