{"categories":["python"],"blog_title":"\u304d\u3082\u3044\u4ea4\u63db\u65e5\u8a18","url":"https://kimoi.hatenadiary.com/entry/20120603/1338698366","author_name":"rocklaakira","blog_url":"https://kimoi.hatenadiary.com/","version":"1.0","author_url":"https://blog.hatena.ne.jp/rocklaakira/","type":"rich","title":"fileinput \u30e2\u30b8\u30e5\u30fc\u30eb\u4fbf\u5229","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkimoi.hatenadiary.com%2Fentry%2F20120603%2F1338698366\" title=\"fileinput \u30e2\u30b8\u30e5\u30fc\u30eb\u4fbf\u5229 - \u304d\u3082\u3044\u4ea4\u63db\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","provider_url":"https://hatena.blog","published":"2012-06-03 13:39:26","height":"190","provider_name":"Hatena Blog","description":"\u6570\u5024\u306e\u307f\u304c\u6539\u884c\u533a\u5207\u308a\u3067\u305f\u304f\u3055\u3093\u5165\u3063\u3066\u3044\u308b\u30c6\u30ad\u30b9\u30c8\u3002 \u5165\u3063\u3066\u308b\u6570\u5024\u3092\u5168\u3066\u8db3\u3057\u7b97\u3057\u306a\u304f\u3066\u306f\u3044\u3051\u306a\u304f\u306a\u3063\u3066\u3001 \u50d5\u306emac\u306b\u306f\u30a8\u30af\u30bb\u30eb\u304c\u5165\u3063\u3066\u3044\u306a\u3044\u306e\u3067\uff08\u5c11\u3057\u6642\u9593\u3082\u3042\u3063\u305f\u306e\u3067\uff09python\u3067\u66f8\u3044\u305f\u3002 calc.py import fileinput print sum([int(line) for line in fileinput.input()]) $ python calc.py numbers.txt fileinput \u30e2\u30b8\u30e5\u30fc\u30eb\u4fbf\u5229\u3002","image_url":null}