Снимите символ в строке Python
s = 'abc12321cba'
print(s.replace('a', ''))
Disturbed Dove
s = 'abc12321cba'
print(s.replace('a', ''))
s = 'ab12abc34ba'
print(s.replace('ab', ''))
for char in line:
if char in " ?.!/;:":
line.replace(char,'')
#you can use replace function to remove specific word.
>>> message = 'you can use replace function'
>>> message.replace('function', '')
>>>'you can use replace '
"Str*ing With Chars I! don't want".replace('!','').replace('*','')
varible.replace(letter, "") # blank quotes.
# e.g.
s = "Hello World"
print(s.replace('e', ""))
# Hllo World
# great for data cleansing