<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>morchin</author_name>
  <author_url>https://blog.hatena.ne.jp/morchin/</author_url>
  <blog_title>プログラミング日記</blog_title>
  <blog_url>https://morchin.hatenadiary.org/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>(0, 1, 2, 3)を(1, 2, 3, 0)にする方法は、以下が一番簡単だと思われる。 &gt;&gt;&gt; a = (0, 1, 2, 3) &gt;&gt;&gt; a[1:] + a[0:1] (1, 2, 3, 0)結局、２つのスライシングで取り出したタプルを単に結合している。しかし、新たなタプルを作成しているので効率はあまり良くない。 イミュータブル(変更不能)なシーケンスを効率良く変更するには、いったんミュータブルなオブジェクトに型変換してから、値を変更し、元の型に戻す。 例えば、文字列とタプルはイミュータブルなので、共にリストに変換してから値を変更すると効率が良い。しかし、面倒だし、変換のオーバーヘッドも…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmorchin.hatenadiary.org%2Fentry%2F20060802%2Fp1&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>2006-08-02 00:00:00</published>
  <title> シーケンスとインデクシングとスライシング</title>
  <type>rich</type>
  <url>https://morchin.hatenadiary.org/entry/20060802/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
