More concise way of slicing off the last character