remove text after certain symbol python string code example
Example 1: how to find and remove certain characters from text string in python
a_string = "addbdcd"
a_string = a_string.replace("d", "")
print(a_string)
Example 2: python remove everything after character
sep = '...'
stripped = text.split(sep, 1)[0]