python ignore characters in string code example
Example: python string ignore characters
text = ['!kick', '/ban', '!k!ck']
for s in text:
print s[0].translate(None, '!/') + s[1:]
output:
kick
ban
k!ck
text = ['!kick', '/ban', '!k!ck']
for s in text:
print s[0].translate(None, '!/') + s[1:]
output:
kick
ban
k!ck