Use str. split() to remove everything after a character in a string
a_string = "ab-cd"
split_string = a_string. split("-", 1) Split into "ab" and "cd"
substring = split_string[0]
print(substring)
sep = '...'
stripped = text.split(sep, 1)[0]
sep = '...'
stripped = text.split(sep, 1)[0]
text = input()
sep = '...'
stripped = text.split(sep, 1)[0]
print(stripped)
mystring = "123⋯567"
mystring[ 0 : mystring.index("⋯")]
>> '123'