What ways to remove a certain number of characters from a string, for example cadena = "123456789"
, I would like to remove last 2 characters from the string. the output would be "1234567"
.
What ways are there to do this? that works for any number of characters to remove ( last )