<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>pashango_p</author_name>
  <author_url>https://blog.hatena.ne.jp/pashango_p/</author_url>
  <blog_title>Pashango’s Blog</blog_title>
  <blog_url>https://pashango-p.hatenadiary.org/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>多次元リストのソートってよく使う機能だと思うんですが、pythonのソートってよく考えて作ってあるなぁと関心しました。例えば、次のような「生徒の成績リスト」があったとします。 # 配列の並び順 [名前],[国語],[算数] a = [ ['Tim', 55, 46 ], ['Jack', 55, 70 ], ['Mathhew', 23, 80 ], ] そこで、リスト２番目の値である「国語」を、点数が高い順にソートするしたい場合は、以下の用になります。 &gt;&gt;&gt; sorted(a, key=lambda x:x[1], reverse=True) [['Tim', 55, 46], ['Jac…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpashango-p.hatenadiary.org%2Fentry%2F20090614%2F1244984058&quot; title=&quot;多重キーでのソート - Pashango’s Blog&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>2009-06-14 21:54:18</published>
  <title>多重キーでのソート</title>
  <type>rich</type>
  <url>https://pashango-p.hatenadiary.org/entry/20090614/1244984058</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
