Python string replace 方法
方法1:
>>> a=\'...fuck...the....world............\'
>>> b=a.replace(\'.\',\' \')
>>> print b
fuck the world
方法2:
>>> a=\'...fuck...the....world............\'
>>> b=string.replace(a,\'.\',\' \')
>>> print b
fuck the world
Python string replace 方法
方法1:
>>> a=\'...fuck...the....world............\'
>>> b=a.replace(\'.\',\' \')
>>> print b
fuck the world
方法2:
>>> a=\'...fuck...the....world............\'
>>> b=string.replace(a,\'.\',\' \')
>>> print b
fuck the world
相关文章: