{"title":"C++\u306eRange-based for\u6587\uff08\u7bc4\u56f2for\u6587\uff09\u3067\u9006\u9806\u306b\u8d70\u67fb\u3059\u308b\u30a4\u30c6\u30ec\u30fc\u30bf\u3092\u81ea\u4f5c\u3057\u305f","author_name":"ai_gaminglife","author_url":"https://blog.hatena.ne.jp/ai_gaminglife/","provider_name":"Hatena Blog","blog_url":"https://ai-gaminglife.hatenablog.com/","image_url":null,"categories":["C++"],"url":"https://ai-gaminglife.hatenablog.com/entry/2020/04/12/161914","version":"1.0","width":"100%","description":"\u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3 Python\u306efor\u6587\u306f\u3001C++\u3067\u3044\u3046\u3068\u3053\u308d\u306eRange-based for\u6587\u3001C#\u3067\u8a00\u3046\u3068\u3053\u308d\u306eforeach\u3068\u540c\u7b49\u306e\u52d5\u4f5c\u3092\u3059\u308b\u3002\u3064\u307e\u308a\u3001 for (int i = 0; i < 10; i++) {} \u306e\u3088\u3046\u306afor\u304c\u5b58\u5728\u3057\u306a\u3044\u3002 Python\u306efor\u6587\u306b\u304a\u3044\u3066\u3001iterable object\u3092enumerate \u30e1\u30bd\u30c3\u30c9\u306b\u6e21\u3059\u3068\u3001\u6dfb\u5b57\u4ed8\u304dRange-based for\u304c\u3067\u304d\u308b\u3002 l = [100, 200, 300] for i, num in enumerate(l): print(i, num) # 0 100 # 1 200 # 2 300 \u3053\u308c\u304c\u975e\u5e38\u306b\u4fbf\u5229\u306a\u306e\u3067C\u2026","type":"rich","provider_url":"https://hatena.blog","blog_title":"Gaming Life","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fai-gaminglife.hatenablog.com%2Fentry%2F2020%2F04%2F12%2F161914\" title=\"C++\u306eRange-based for\u6587\uff08\u7bc4\u56f2for\u6587\uff09\u3067\u9006\u9806\u306b\u8d70\u67fb\u3059\u308b\u30a4\u30c6\u30ec\u30fc\u30bf\u3092\u81ea\u4f5c\u3057\u305f - Gaming Life\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2020-04-12 16:19:14"}