Pythonで文字列を置換する:replace(), re.sub() - ポップインサイト
Python で文字列を別の文字列で置換したいときは replace あるいは re.sub を使います。 r