URLify a given string ( Replace spaces is % 20 ) | Instantiate the string ; Trim the given string ; Replace All space ( unicode is \\ s ) to % 20 ; Display the result
s = " Mr ▁ John ▁ Smith ▁ " NEW_LINE s = s . strip ( ) NEW_LINE s = s . replace ( ' ▁ ' , " % 20" ) NEW_LINE print ( s ) NEW_LINE