how to get the last part of a string before a certain character?,print(x.rpartition('-')[0])