def remafterellipsis(text):
    where_ellipsis = text.find('...')
if where_ellipsis == -1:
    return text
return text[:where_ellipsis + 3]
How to remove all characters after a specific character in python?