<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>supermantaro123</author_name>
  <author_url>https://blog.hatena.ne.jp/supermantaro123/</author_url>
  <blog_title>supermantaro123のブログ</blog_title>
  <blog_url>https://supermantaro.hatenadiary.com/</blog_url>
  <categories>
    <anon>スクレイピング</anon>
  </categories>
  <description>こんにちは！ 少し間が空いてしまいましたが、本日は改行コードを文字列から削除する方法を書きたいと思います。 テキストファイルをPythonで利用するときには改行コードや空白が邪魔になります。 スクレイピングした際にはそういった情報がどうしても入ってくるので、 それを削除してみようというのが今回の目標です。 いくつか手段があるようです。 文字列から全て改行コードを削除する方法 文字列の先頭と末尾から改行コードを削除する方法 文字列から末尾の改行コードを削除する方法 今回はすべての改行コードが邪魔になったため、削除してしまいます。 使うのはreplace()というメソッドです。 使い方は簡単。 x…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsupermantaro.hatenadiary.com%2Fentry%2F2023%2F09%2F19%2F191401&quot; title=&quot;Pythonで改行コード\nを文字列から削除する - supermantaro123のブログ&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>2023-09-19 19:14:01</published>
  <title>Pythonで改行コード\nを文字列から削除する</title>
  <type>rich</type>
  <url>https://supermantaro.hatenadiary.com/entry/2023/09/19/191401</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
