<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>cheeseshop</author_name>
  <author_url>https://blog.hatena.ne.jp/cheeseshop/</author_url>
  <blog_title>Pythonを書く</blog_title>
  <blog_url>https://cheeseshop.hatenadiary.org/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>PHPにはbase_convert()という関数があり、2〜36進数文字列どうしの変換ができます。 Pythonは、「int(&quot;ABCD&quot;,base=16)」として2〜36進数表現からlong値へ変換はできますが、逆にlong値を組み込み関数またはフォーマット文字列を使って2、8、16進数表現にしか変換できません。 ここではbase_convertと似たようなものを作ってみます。ただし数値は文字列としてではなく、桁ごとのリスト（桁の大きい方から並べる、いわゆるbig-endian）として渡すことにします。 ## (Python2.4用) #def any(iterable): # for el…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcheeseshop.hatenadiary.org%2Fentry%2F20081217%2F1237077843&quot; title=&quot; 基数変換 - n進数をm進数に変換する - Pythonを書く&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>2008-12-17 09:44:03</published>
  <title> 基数変換 - n進数をm進数に変換する</title>
  <type>rich</type>
  <url>https://cheeseshop.hatenadiary.org/entry/20081217/1237077843</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
