<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tmg1998</author_name>
  <author_url>https://blog.hatena.ne.jp/tmg1998/</author_url>
  <blog_title>TIL</blog_title>
  <blog_url>https://tmg0525.hatenadiary.jp/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>Pythonで文字列の先頭と末尾から指定した文字を取り除いくにはstrのstrip()メソッドを使う。 &gt;&gt;&gt; s2 = 'google.com' &gt;&gt;&gt; s2.strip('gm') 'oogle.co' &gt;&gt;&gt; s2.strip('gmo') 'le.c' 先頭と末尾から取り除くため、中間にあるものは取り除かれない。また、引数に指定した文字が含まれていなくても問題はない。 &gt;&gt;&gt; s2.strip('gmoani') 'le.c' 引数で指定した文字が続くまで削除してる感じなのかな？ 参考文献 4. Built-in Types — Python 3.6.3 documentation</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftmg0525.hatenadiary.jp%2Fentry%2F2017%2F10%2F19%2F232622&quot; title=&quot;文字列の先頭と末尾から指定した文字を取り除く - Python - TIL&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>2017-10-19 23:26:22</published>
  <title>文字列の先頭と末尾から指定した文字を取り除く - Python</title>
  <type>rich</type>
  <url>https://tmg0525.hatenadiary.jp/entry/2017/10/19/232622</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
