<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rare_Remrin</author_name>
  <author_url>https://blog.hatena.ne.jp/rare_Remrin/</author_url>
  <blog_title>Remrinのpython攻略日記</blog_title>
  <blog_url>https://python-remrin.hatenadiary.jp/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>ジェネレータについて。 通常の関数のreturnの部分をyieldとするとジェネレータを自作できる。 偶数を生成するジェネレータ def gene(): even = 0 while True: yield even even += 2 e = gene() for i in range(5): print(next(e)) 素数を生成するジェネレータ def gen2(start=2, stop=1000000): pr = max(1, start - 1) while True: while pr &lt; stop: pr += 1 if all(pr%x != 0 for x in ran…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpython-remrin.hatenadiary.jp%2Fentry%2F2017%2F05%2F22%2F114416&quot; title=&quot;ジェネレータ - Remrinのpython攻略日記&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-05-22 11:44:16</published>
  <title>ジェネレータ</title>
  <type>rich</type>
  <url>https://python-remrin.hatenadiary.jp/entry/2017/05/22/114416</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
