<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>lazy_skunk</author_name>
  <author_url>https://blog.hatena.ne.jp/lazy_skunk/</author_url>
  <blog_title>ちんぱんの雑記</blog_title>
  <blog_url>https://lazy-skunk.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>最大値を探すとき、初期値には 0 や None 以外に負の無限大を表す -float(&quot;inf&quot;) も使えるって話。 inf は infinity。float(&quot;inf&quot;) で正の無限大を作り、先頭の - で負の無限大にしている。 実務で使うかどうかは別だけど、こういう選択肢を持っておいて損はないと思う。さして得もないかもしれないけど…。 3番目に大きい値を探す例 空ではない整数の配列から、重複を除いた3番目の最大値を返す関数を考える。異なる値が3つなければ、最大値を返すことにする。 def third_max(nums: list[int]) -&gt; int: first_max = seco…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flazy-skunk.hatenablog.com%2Fentry%2F2024%2F04%2F05%2F225042&quot; title=&quot;数値の初期化 - ちんぱんの雑記&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>2024-04-05 22:50:42</published>
  <title>数値の初期化</title>
  <type>rich</type>
  <url>https://lazy-skunk.hatenablog.com/entry/2024/04/05/225042</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
