{"id":1274,"date":"2018-10-14T22:40:02","date_gmt":"2018-10-14T13:40:02","guid":{"rendered":"https:\/\/python-introduction.com\/?p=1274"},"modified":"2018-10-14T22:40:02","modified_gmt":"2018-10-14T13:40:02","slug":"%e3%80%90python%e5%85%a5%e9%96%80%e3%80%91zip%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9","status":"publish","type":"post","link":"https:\/\/python-introduction.com\/?p=1274","title":{"rendered":"\u3010Python\u5165\u9580\u3011zip\u95a2\u6570\u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u3067\u306fzip\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066<br \/>\n\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2>\u3010Python\u3011zip\u95a2\u6570\u306e\u4f7f\u3046\u524d\u306b<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/10\/pasokonkomatatonesan1014.jpg\" alt=\"python zip\u95a2\u6570\" width=\"620\" height=\"341\" class=\"alignnone size-full wp-image-1276\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/10\/pasokonkomatatonesan1014.jpg 620w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/10\/pasokonkomatatonesan1014-300x165.jpg 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/p>\n<p>\u305f\u3068\u3048\u3070\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u8868\u793a\u3055\u305b\u305f\u3044\u3068\u3057\u305f\u3089<br \/>\n\u3069\u306e\u3088\u3046\u306a\u8a18\u8ff0\u3092\u3059\u308c\u3070\u3088\u3044\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<div class=\"boxstyle01\">5\u6708 \u3086\u304d\u3053 \u30ab\u30d0\u30f3<br \/>\n6\u6708 \u306f\u306a\u3053 \u6642\u8a08<br \/>\n7\u6708 \u3055\u3061\u3048 \u30d1\u30bd\u30b3\u30f3<\/div>\n<p>\u539f\u59cb\u7684\u306a\u65b9\u6cd5\u306a\u3089\u4f8b\u984c1\u306e\u3088\u3046\u306a\u8a18\u8ff0\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c1\r\n\r\nbirthday = ['5\u6708', '6\u6708', '7\u6708']\r\naite = ['\u3086\u304d\u3053', '\u306f\u306a\u3053', '\u3055\u3061\u3048']\r\npresent = ['\u30ab\u30d0\u30f3', '\u6642\u8a08', '\u30d1\u30bd\u30b3\u30f3']\r\n\r\nfor i in range(len(birthday)):\r\n    print(birthday[i], aite[i], present[i])<\/pre>\n<p>\u5909\u6570birthday,aite,present\u306b\u305d\u308c\u305e\u308c\u5024\u3092\u4ee3\u5165\u3057<br \/>\nfor\u6587\u3068range\u95a2\u6570\u3092\u4f7f\u3046\u3053\u3068\u3067prin<\/p>\n<div class=\"boxstyle01\">5\u6708 \u3086\u304d\u3053 \u30ab\u30d0\u30f3<br \/>\n6\u6708 \u306f\u306a\u3053 \u6642\u8a08<br \/>\n7\u6708 \u3055\u3061\u3048 \u30d1\u30bd\u30b3\u30f3<\/div>\n<p>\u3068\u8868\u793a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>range\u95a2\u6570\u306b\u3064\u3044\u3066\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<br \/>\n\u21d2<a href=\"https:\/\/python-introduction.com\/?p=1262\" target=\"blank\">\u3010Python\u5165\u9580\u3011range\u95a2\u6570\u3067for\u6587\u306e\u9762\u5012\u306a\u8a18\u8ff0\u304b\u3089\u89e3\u653e\u3055\u308c\u3088\u3046<\/a><\/p>\n<p>\u305d\u308c\u304b\u3089len\u95a2\u6570\u306b\u3064\u3044\u3066\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<br \/>\n\u21d2<a href=\"https:\/\/python-introduction.com\/?p=620\" target=\"blank\">\u3010Python\u3011\u30ea\u30b9\u30c8\u306e\u8981\u7d20\u6570\u3092\u53d6\u5f97\u3057\u305f\u308a\u62bd\u51fa\u3057\u305f\u308a\u3059\u308b\u65b9\u6cd5<\/a><\/p>\n<p>\u4f8b\u984c1\u306fprint\u6587\u4e2d\u306b<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">print(birthday[i], aite[i], present[i])<\/pre>\n<p>\u3068\u3001i\u304c\u6563\u5728\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><span class=\"yellowbg\">\u7d50\u69cb\u9762\u5012\u304f\u3055\u3044\u8a18\u8ff0\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306d\u3002<\/span><\/p>\n<p>\u305d\u3053\u3067zip\u95a2\u6570\u3092\u5229\u7528\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><span class=\"redb16\">zip\u95a2\u6570\u3092\u4f7f\u3046\u3053\u3068\u3067\u4f8b\u984c1\u306e\u7d50\u679c\u3092\u5f97\u308b\u306e\u304c<br \/>\n\u304b\u306a\u308a\u697d\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n<h2>\u3010Python\u3011zip\u95a2\u6570\u306e\u4f7f\u3044\u65b9<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/10\/pasokonopnaesa1014.jpg\" alt=\"python zip\u95a2\u6570\" width=\"620\" height=\"341\" class=\"alignnone size-full wp-image-1278\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/10\/pasokonopnaesa1014.jpg 620w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/10\/pasokonopnaesa1014-300x165.jpg 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/p>\n<p>zip\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<br \/>\n\u305d\u3057\u3066\u4f8b\u984c1\u3068\u540c\u3058\u7d50\u679c\u306b\u306a\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4f8b\u984c2\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c2\r\n\r\nbirthday = ['5\u6708', '6\u6708', '7\u6708']\r\naite = ['\u3086\u304d\u3053', '\u306f\u306a\u3053', '\u3055\u3061\u3048']\r\npresent = ['\u30ab\u30d0\u30f3', '\u6642\u8a08', '\u30d1\u30bd\u30b3\u30f3']\r\n\r\nfor tanjoubi, kanojo, okurimono in zip(birthday, aite, present):\r\n    print(tanjoubi, kanojo, okurimono)<\/pre>\n<p>\u4f8b\u984c2\u3092\u5b9f\u884c\u3059\u308b\u3068<\/p>\n<div class=\"boxstyle01\">5\u6708 \u3086\u304d\u3053 \u30ab\u30d0\u30f3<br \/>\n6\u6708 \u306f\u306a\u3053 \u6642\u8a08<br \/>\n7\u6708 \u3055\u3061\u3048 \u30d1\u30bd\u30b3\u30f3<\/div>\n<p>\u4f8b\u984c1\u3068\u540c\u3058\u7d50\u679c\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u306d\u3002<\/p>\n<p>\u4f8b\u984c2\u3067<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">for tanjoubi, kanojo, okurimono in zip(birthday, aite, present):<\/pre>\n<p>\u306e\u90e8\u5206\u3067\u3059\u304c\u3001<\/p>\n<p>zip\u95a2\u6570\u306e\u4e2d\u306ebirthday\u306e\u6700\u521d\u306b\u5165\u3063\u3066\u3044\u308b5\u6708\u3092\u30d4\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066<br \/>\ntanjoubi\u306b\u5165\u308c\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u304b\u3089aite\u306e\u6700\u521d\u306b\u5165\u3063\u3066\u3044\u308b\u3086\u304d\u3053\u3092\u30d4\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066<br \/>\nkanojo\u306b\u5165\u308c\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001present\u306e\u6700\u521d\u306b\u5165\u3063\u3066\u3044\u308b\u30ab\u30d0\u30f3\u3092\u30d4\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066<br \/>\nokurimono\u306b\u5165\u308c\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001print\u6587\u306e\u4e2d\u8eab\u306f<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">print(tanjoubi, kanojo, okurimono)<\/pre>\n<p>\u3068\u3001\u6700\u521d\u306b\u4f5c\u3063\u305f\u5909\u6570\u3067\u3042\u308bbirthday, aite, present\u3067\u306f\u306a\u304f\u3066<br \/>\ntanjoubi, kanojo, okurimono\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><span class=\"yellowbg\">zip\u95a2\u6570\u3092\u4f7f\u3046\u3053\u3068\u3067\u4f8b\u984c1\u3067\u4f7f\u7528\u3057\u305f[i]\u3068\u3044\u3063\u305f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092<br \/>\n\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/span><br \/>\n\u3060\u304b\u3089\u3001\u304b\u306a\u308a\u8a18\u8ff0\u304c\u697d\u306b\u306a\u308b\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u305c\u3072zip\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3066<br \/>\n\u5b9f\u969b\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u6d3b\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u3053\u306e\u8a18\u4e8b\u3067\u306fzip\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066 \u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002 \u3010Python\u3011zip\u95a2\u6570\u306e\u4f7f\u3046\u524d\u306b \u305f\u3068\u3048\u3070\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u8868\u793a\u3055\u305b\u305f\u3044\u3068\u3057\u305f\u3089 \u3069\u306e\u3088\u3046\u306a\u8a18\u8ff0\u3092\u3059\u308c\u3070\u3088\u3044\u306e\u3067\u3057\u3087\u3046\u304b\uff1f 5\u6708 \u3086\u304d\u3053 \u30ab\u30d0\u30f3 6 [&hellip;]","protected":false},"author":1,"featured_media":1275,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,39],"tags":[3,133],"_links":{"self":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/1274"}],"collection":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1274"}],"version-history":[{"count":5,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/1274\/revisions"}],"predecessor-version":[{"id":1282,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/1274\/revisions\/1282"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/media\/1275"}],"wp:attachment":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}