pythonremove char from string code example
Example 1: take off character in python string
s = 'abc12321cba'
print(s.replace('a', ''))
Example 2: remove a char in a string python
s = 'abc12321cba'
print(s.replace('a', ''))
=>s
out:bc12321cb
s = 'abc12321cba'
print(s.replace('a', ''))
s = 'abc12321cba'
print(s.replace('a', ''))
=>s
out:bc12321cb