我们可以使用findall代替多次替换吗

import re
a = ["%!It depends%% on what you m\\ean by dying.",
     "It is widely~ read and at the top_x000D_ of all the search%%__ engines.",
     "\\H~owever, Wikipedia has internal problems",
     "%%a+b!=a-b"]
p = [((((((str(a[i]).replace("%!", "")).replace("%", ""))
     .replace("~", "")).replace("_x000D_","")).replace("__", ""))
     .replace("\\", "")) for i in range(len(a)) if a[i] != ""]
print(p)
评论