Remove Last N Characters from String using Python July 7, 2021 Python 0 Comments 259 Views Slicing text = 'HelloWorld!' n = 6 result = text[:-n] print(result) # Hello
Leave a Comment
Cancel reply