trim last 3 items from string tyscprit code example Example: python remove last 4 characters from string foo = foo[:-n]