strip the last 3 chars of a string pythin code example Example: python remove last 4 characters from string foo = foo[:-n]