python remove string after character code example
Example 1: drop all characters after a character in python
sep = '...'
stripped = text.split(sep, 1)[0]
Example 2: python remove everything after character
sep = '...'
stripped = text.split(sep, 1)[0]