<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mi_kattun</author_name>
  <author_url>https://blog.hatena.ne.jp/mi_kattun/</author_url>
  <blog_title>orangain flavor</blog_title>
  <blog_url>https://orangain.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>Pythonの文字列置換は、置換の仕方やバージョンによって利用すべきモジュールが異なっており、少しわかりにくいので、Python 2.xでのstrとunicode、3.xでのstrでの置換をまとめます。 文字列による単純な置換 (str.replace) str (2.x) / unicode / str (3.x)のどれでもほぼ同じです。 src = 'I like orange.' dst = src.replace('orange', 'apple') # 'I like apple.' str.replaceの第3引数で置換を行う最大回数を指定できます。 str.replace (2.…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Forangain.hatenablog.com%2Fentry%2F20100503%2F1272900555&quot; title=&quot;Pythonでの文字列置換をマスターする - orangain flavor&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-05-03 00:29:15</published>
  <title>Pythonでの文字列置換をマスターする</title>
  <type>rich</type>
  <url>https://orangain.hatenablog.com/entry/20100503/1272900555</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
