# Emphasizer.py """ How to use the lstrip and rstrip methods and the len function to replace each leading blank in a string with the character ">" and each trailing blank with the character "<" . """ s = ' Stand Still ' print '\n',s # Remove the leading blanks and count how many there are. s1 = s.lstrip() nLeadingBlanks = len(s)-len(s1) s = s.replace(' ','>',nLeadingBlanks) # Remove the trailing blanks and count how many there are. s2 = s.rstrip() nTrailingBlanks = len(s)-len(s2) s = s.replace(' ','<',-nTrailingBlanks) print s