<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>inarizuuuushi</author_name>
  <author_url>https://blog.hatena.ne.jp/inarizuuuushi/</author_url>
  <blog_title>Sabrou-mal サブロウ丸</blog_title>
  <blog_url>https://inarizuuuushi.hatenablog.com/</blog_url>
  <categories>
    <anon> python </anon>
  </categories>
  <description>普通にリストの内包表記の感覚でタプルの内包表記を書こうとすると a = (i for i in range(10)) type(a) &gt; &lt;class 'generator'&gt; と、ジェネレータが作成されてしまいます。 タプルが欲しいのに….と言うときは、 b = tuple(a) とtupleでジェネレーターをラップさせればokです。 もしくは、 b = tuple(i for i in range(10)) と、直接書く方法もあります。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finarizuuuushi.hatenablog.com%2Fentry%2F2017%2F03%2F31%2F090231&quot; title=&quot;Python ジェネレーター内包表記 - Sabrou-mal サブロウ丸&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-03-31 09:02:31</published>
  <title>Python ジェネレーター内包表記</title>
  <type>rich</type>
  <url>https://inarizuuuushi.hatenablog.com/entry/2017/03/31/090231</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
