remove all char in string after character python code example
Example 1: how to remove all characters from a string in python
s = 'abc12321cba'
print(s.replace('a', ''))
Example 2: python remove everything after character
sep = '...'
stripped = text.split(sep, 1)[0]