用re.sub去除标点符号失败怎么办

punc = string.punctuation
re.sub(r'[%s]+'%punc,'',str(open('d:\a.txt','r').readlines()))
执行完也不报错😿

建议分步写,读取文件的字符串先打印看看