translate

毎日Python/こつこつPython

【毎日Python】Pythonで複数の文字列を置換する方法|translate

Pythonで複数の文字を置き換える方法です。使用するのは、Pythonの組み込み関数のtranslateメソッドです。まず、このような文字列を作成します。 a = 'cool-language-python' translateメソッドで...