Python で string.replace( "orig", "new" ) で文字列置換 ― 2021年01月22日 14時14分22秒
簡単な実例。
>>> text = "one, two, three"
>>> text.replace( "one", "two" )
'two, two, three'
>>> text.replace( "two", "three" )
'one, three, three'
コメント
トラックバック
このエントリのトラックバックURL: http://uyota.asablo.jp/blog/2021/01/22/9339969/tb
※なお、送られたトラックバックはブログの管理者が確認するまで公開されません。
コメントをどうぞ
※メールアドレスとURLの入力は必須ではありません。 入力されたメールアドレスは記事に反映されず、ブログの管理者のみが参照できます。
※なお、送られたコメントはブログの管理者が確認するまで公開されません。