<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>XaroCydeykn</author_name>
  <author_url>https://blog.hatena.ne.jp/XaroCydeykn/</author_url>
  <blog_title>何かを書き留める何か</blog_title>
  <blog_url>https://xaro.hatenablog.jp/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>Pythonのリストの中身をソートしたい場合、list.sort()かsorted()を使う。 その際に何をキーとしてソートをするかをkey引数として渡すことができる。 よくある状況として、辞書を含むリストが存在し、辞書の特定のキーの値でソートしたい、という状況である。 import datetime import random import string people = [ { &quot;name&quot;: &quot;&quot;.join([random.choice(string.ascii_letters) for i in range(10)]), &quot;birthday&quot;: datetime.date.fromor…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxaro.hatenablog.jp%2Fentry%2F2017%2F04%2F21%2F235020&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-04-21 23:50:20</published>
  <title>Pythonのソートキーに何を渡すべきか</title>
  <type>rich</type>
  <url>https://xaro.hatenablog.jp/entry/2017/04/21/235020</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
