Answers for "python string ignore characters"

0

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
Posted by: Guest on December-30-2020

Code answers related to "python string ignore characters"

Python Answers by Framework

Browse Popular Code Answers by Language