<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>paveway</author_name>
  <author_url>https://blog.hatena.ne.jp/paveway/</author_url>
  <blog_title>プログラムを書こう！</blog_title>
  <blog_url>https://www.paveway.info/</blog_url>
  <categories>
  </categories>
  <description>この記事は 2021 年 10 月 27 日に投稿しました。 目次 はじめに Python の辞書を値でソートする おわりに リンク 1. はじめに こんにちは、iOS のエディタアプリPWEditorの開発者の二俣です。 今回は業務で使用している Pythonの辞書を値でソートする方法についてです。 目次へ 2. Python の辞書を値でソートする Pythonの辞書を値でソートするには、itemsメソッドとsorted関数を使用します。 ラムダ式によりソートに使用するキーを辞書の値にします。 実装例 # 辞書を定義します。 fruits = {&quot;1&quot;: &quot;banana&quot;, &quot;2&quot;: &quot;o…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.paveway.info%2Fentry%2F2021%2F10%2F27%2Fpython_dictionary_sorted_value&quot; title=&quot;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>https://cdn.user.blog.st-hatena.com/default_entry_og_image/152787833/1526825363332444</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-10-27 07:13:52</published>
  <title>Python の辞書を値でソートする</title>
  <type>rich</type>
  <url>https://www.paveway.info/entry/2021/10/27/python_dictionary_sorted_value</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
