Standard builtin functions have been tested gazillion times by programs all around the world. It is almost impossible that you discover an unknown bug in them. strip() removes characters only at both ends of the string. You will have to use replace()
From the Python manual that ships with every installation:
Return a copy of the string with the leading and trailing characters removed. The chars argument is a string specifying the set of characters to be removed. If omitted or None, the chars argument defaults to removing whitespace. ...
Python has an easy syntax, the trick is to get to know the many functions/methods that it offers. Good luck with your studies.