📜  python 字符串忽略字符 - Python 代码示例

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

代码示例1
text = ['!kick', '/ban', '!k!ck']
for s in text:
    print s[0].translate(None, '!/') + s[1:]

output:
kick
ban
k!ck