''' Purpose: demonstrate strip() function capabilities ''' # get inputs text = input( 'Enter text: ' ) s = input( 'Enter stripping characters: ' ) print() # get cleaned up version of the text # if given an argument for strip(), that's a string, removes all of the characters in the string s that are # at the start or end of string text # if no arguments are given in strip(), then strip all whitespaces at the beginning or end by default output = text.strip( s ) # print the result print( output )