get a new string including all but the last character of string `x`,x[:(-2)]