PYTHON3 how to remove characters from string code example
Example 1: take off character in python string
s = 'abc12321cba'
print(s.replace('a', ''))
Example 2: delete certain characters from a string python
for char in line:
if char in " ?.!/;:":
line.replace(char,'')
Example 3: remove a part of a string python
url = 'abcdc.com'
print(url.replace('.com',''))