<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yumimue</author_name>
  <author_url>https://blog.hatena.ne.jp/yumimue/</author_url>
  <blog_title>ひきメモ</blog_title>
  <blog_url>https://yumimue.hatenadiary.org/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>元のリストを並び替える &gt;&gt;&gt; arr = [3, 1, 5, 2, 4] &gt;&gt;&gt; arr.sort() # 昇順に並び替え &gt;&gt;&gt; arr [1, 2, 3, 4, 5] &gt;&gt;&gt; arr = [3, 1, 5, 2, 4] &gt;&gt;&gt; arr.reverse() # 逆順に並び替え &gt;&gt;&gt; arr [4, 2, 5, 1, 3] これらはリストオブジェクトのメソッドなので、タプルには使えません。 新しいリストを作って並び替える sorted( )、reversed( )はリスト、タプル、イテレータから新しいリストを作ります。 &gt;&gt;&gt; arr = (3, 1, 5, 2, 4) &gt;&gt;&gt; sorte…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyumimue.hatenadiary.org%2Fentry%2F20071217%2F1197910700&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>2007-12-17 01:58:20</published>
  <title>リストとタプルと並び替え</title>
  <type>rich</type>
  <url>https://yumimue.hatenadiary.org/entry/20071217/1197910700</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
