Python Eliminar el último carácter de la cadena
str = "string"
str = str[:-1] # Returns "strin"
Batman
str = "string"
str = str[:-1] # Returns "strin"
st = "abcdefghij"
st = st[:-1] // Returns string with last character removed
str = "string_example"
str = str[:-1] # -> returns "string_exampl" (-> without the "e")
# Python program to remove last character from a string using slice notation
text= 'Hello World!'
print(text[:-1])
#Removing last three characters
foo = foo[:-3]
your_string = "hello"
your_string = your_string[:-1] # this removes the last character from your string