<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>anderiens</author_name>
  <author_url>https://blog.hatena.ne.jp/anderiens/</author_url>
  <blog_title>AnDeriensのブログ</blog_title>
  <blog_url>https://blog.anderiens.com/</blog_url>
  <categories>
    <anon>Tech</anon>
    <anon>AtCoder</anon>
  </categories>
  <description>Pythonでリストをつくるときは乗算をつかって作ることができる。 x = ['.'] * 3 print(x) x[1] = '*' print(x) code しかし、二次元にすると、ちょっとおかしなことになる。 (1,1)だけ変えたいのに、(0,1), (2,1)も変わってしまう。 def present(l): for i in range(len(l)): print(l[i]) print('') x = [['.'] * 3] * 3 present(x) x[1][1] = 'B' present(x) output ['.', '.', '.'] ['.', '.', '.'…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.anderiens.com%2Fentry%2Fpython-list-reference&quot; title=&quot;Pythonの二次元リストを作る際に気をつけたいこと - AnDeriensのブログ&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/155445913/1573896025164977</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-11-09 00:29:32</published>
  <title>Pythonの二次元リストを作る際に気をつけたいこと</title>
  <type>rich</type>
  <url>https://blog.anderiens.com/entry/python-list-reference</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
