<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>PlugOut</author_name>
  <author_url>https://blog.hatena.ne.jp/PlugOut/</author_url>
  <blog_title>Unknown Region</blog_title>
  <blog_url>https://plugout.hateblo.jp/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>備忘録がてらメモ。 pythonにおいて文字列→数値へパースする際、使用できる文字はちょっと特殊で全角の「１」なども含まれる。 ただ当たり前だが、それを更に文字列に変換すると半角数字になるので注意。 例: demo.py raw_value = &quot;１&quot; # 全角の「１」を与える value = int(raw_value) # intへ変換 print(str(value)) # 半角の「1」が出力される 結果: demo.py 1 ちなみに余談だが[string.isdigit()]という関数は文字列が数字であるかどうかを返し、今回のような全角の「１」などでもちゃんとTrueを返す。 ただこ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fplugout.hateblo.jp%2Fentry%2F2021%2F03%2F07%2F111225&quot; title=&quot;【Python】文字列から数値へパースする際の落とし穴 - Unknown Region&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>https://cdn-ak.f.st-hatena.com/images/fotolife/P/PlugOut/20191215/20191215222436.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-03-07 11:12:25</published>
  <title>【Python】文字列から数値へパースする際の落とし穴</title>
  <type>rich</type>
  <url>https://plugout.hateblo.jp/entry/2021/03/07/111225</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
