{"width":"100%","blog_title":"inamori\u2019s diary","height":"190","description":"\u9806\u756a\u304c\u9006\u306b\u306a\u3063\u305f\u304c\u3001\u6628\u65e5\u4f7f\u3063\u305f\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u306e\u8aac\u660e\u3092\u3002 def count(n): step = 1 while True: n += step yield nfor i in count(0): if i >= 10: break print i, 1 2 3 4 5 6 7 8 9\u95a2\u6570\u306e\u4e2d\u306byield\u3068\u3044\u3046\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u3042\u308b\u3068\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u306b\u306a\u308b\u3089\u3057\u3044\u3002yield\u304c\u3042\u308b\u3068\u305d\u3053\u3067\u5024\u3092\u8fd4\u3057\u3001\u6b21\u306b\u547c\u3070\u308c\u308b\u3068\u5024\u3092\u8fd4\u3057\u305f\u6b21\u304b\u3089\u5b9f\u884c\u3055\u308c\u308b\u3002 \u3053\u308c\u3092\u30af\u30e9\u30b9\u3067\u8868\u73fe\u3059\u308b\u3068\u6b21\u306e\u3088\u3046\u306b\u306a\u308b\u3002 class count: def __init__(self, n): self.n = n self.step = 1 de\u2026","categories":["Python"],"blog_url":"https://inamori.hateblo.jp/","provider_url":"https://hatena.blog","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20081117%2Fp1\" title=\"\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\uff081\uff09 - inamori\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://inamori.hateblo.jp/entry/20081117/p1","title":"\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\uff081\uff09","author_url":"https://blog.hatena.ne.jp/inamori/","image_url":null,"type":"rich","published":"2008-11-17 00:00:00","provider_name":"Hatena Blog","author_name":"inamori"}