{"version":"1.0","description":"\u7d50\u8ad6\u304b\u3089\u8a00\u3046\u3068\u4e0b\u8a18\u304c\u6700\u3082\u30b9\u30de\u30fc\u30c8\u3067\u30e2\u30c0\u30f3\u306a\u66f8\u304d\u65b9\u3063\u307d\u3044\u3002 with open('/tmp/test.txt') as f: for line in f: print line \u4e0b\u8a18\u306f\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u5473\u304c\u5168\u90e8\u30e1\u30e2\u30ea\u306b\u4e57\u3063\u3061\u3083\u3046\u304b\u3089\u5371\u967a\u3002 f = open('/tmp/test.txt') for line in f.readlines(): print line f.close() \u307e\u3068\u3081(\u30a4\u30c6\u30ec\u30fc\u30bf) for line in f: print line \u3068\u3044\u3046\u66f8\u304d\u65b9\u304c\u3067\u304d\u308b\u306e\u306ffile\u304c__iter__()\u3068next()\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u304a\u304b\u3052\u3002\u8a73\u3057\u304f\u306fPEP-234\u306b\u8a73\u3057\u304f\u66f8\u3044\u3066\u3042\u308b\u3002 \u307f\u3093\u306a\u306ePy\u2026","type":"rich","blog_title":"oinume journal","title":"Python\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\u30b9\u30de\u30fc\u30c8\u306a\u3084\u308a\u65b9","image_url":"http://ecx.images-amazon.com/images/I/51uQpDtF+dL.jpg","categories":["Python"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Foinume.hatenablog.com%2Fentry%2Fwp%2F418\" title=\"Python\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\u30b9\u30de\u30fc\u30c8\u306a\u3084\u308a\u65b9 - oinume journal\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"oinume","provider_url":"https://hatena.blog","published":"2011-06-13 13:06:59","width":"100%","author_url":"https://blog.hatena.ne.jp/oinume/","url":"https://oinume.hatenablog.com/entry/wp/418","provider_name":"Hatena Blog","height":"190","blog_url":"https://oinume.hatenablog.com/"}