str = "string" str = str[:-1] # Returns "strin"
st = "abcdefghij" st = st[:-1] # Returns string with last character removed
your_string = "hello" your_string = your_string[:-1] # this removes the last character from your string
foo = foo[:-n]
str = "abc" str = str[:-1] print(str) >>> ab
st = "abcdefghij" st = st[:-1]
st="velm" str = str[:-1]