📜  字符串替换 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:40.499000             🧑  作者: Mango

代码示例6
string = "Hey! What's up?"
characters = "'!?"

for x in range(len(characters)):
    string = string.replace(characters[x],"")

print(string)