arg = '-repeat' print(arg[:arg.rfind('-')+1])