Python удалить последний символ из строки
str = "string"
str = str[:-1] # Returns "strin"
Batman
str = "string"
str = str[:-1] # Returns "strin"
#Removing last three characters
foo = foo[:-3]
your_string = "hello"
your_string = your_string[:-1] # this removes the last character from your string