""" Purpose: demonstrate strip() function capabilities """ # get inputs text = input( "Enter text: " ) s = input( 'Enter stripping characters: ' ) # any characters in this string will be stripped from the beginning or the end print() # get cleaned up version of the text output = text.strip( s ) # print the result print( output ) # this will still only affect leading and trailing characters, use replace() to change interior characters # replace() is different, it would be looking for the entirety of the string