python delete last character in string not working code example Example: python remove last character from string str = "string" str = str[:-1] # Returns "strin"