how to delete last 3 characters in string python code example Example: python flask how to remove last character from string string="mystring"; string[:-1]