{"id":1316,"date":"2023-01-24T17:30:53","date_gmt":"2023-01-24T08:30:53","guid":{"rendered":"https:\/\/blog.dozzing.kr\/?p=1316"},"modified":"2025-10-24T17:31:33","modified_gmt":"2025-10-24T08:31:33","slug":"python-%eb%a6%ac%ec%8a%a4%ed%8a%b8%eb%a5%bc-%eb%94%95%ec%85%94%eb%84%88%eb%a6%ac%eb%a1%9c-%eb%b3%80%ed%99%98%ed%95%98%ea%b8%b0zip","status":"publish","type":"post","link":"https:\/\/blog.dozzing.kr\/?p=1316","title":{"rendered":"[Python] \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\uae30(zip)"},"content":{"rendered":"<h2>\ud83d\udcab \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\ub294 \ubc29\ubc95<\/h2>\n<pre><code class=\"language-python line-numbers\">name = [\"may\", \"kein\"]\nage = [17, 19]\n<\/code><\/pre>\n<ol>\n<li><code>for<\/code> \ub8e8\ud504 \ubc29\uc2dd<\/li>\n<\/ol>\n<pre><code class=\"language-python line-numbers\">dic = {}\nfor i in range(len(name)):\n    dic[name[i]] = age[i]\n<\/code><\/pre>\n<ol>\n<li><code>dict comprehension<\/code><\/li>\n<\/ol>\n<pre><code class=\"language-python line-numbers\">dic = {n: y for n, y in zip(name, age)}\n<\/code><\/pre>\n<ol>\n<li><code>dict(zip(...))<\/code><\/li>\n<\/ol>\n<pre><code class=\"language-python line-numbers\">dic = dict(zip(name, age))\n<\/code><\/pre>\n<h2>\ud83d\udcab <code>dict(zip(...))<\/code> \ud568\uc218\ub780?<\/h2>\n<ul>\n<li>\ud30c\uc774\uc36c\uc5d0\uc11c <strong>\uc5ec\ub7ec \uc2dc\ud000\uc2a4(\ub9ac\uc2a4\ud2b8, \ud29c\ud50c \ub4f1)\ub97c \ubb36\uc5b4\uc8fc\ub294 \ud568\uc218<\/strong><\/li>\n<li>\uac19\uc740 \uc778\ub371\uc2a4\ub07c\ub9ac \ubb36\uc5b4\uc11c <strong>\ud29c\ud50c<\/strong>\ub85c \ubc18\ud658<\/li>\n<li>\uae38\uc774\uac00 \ub2e4\ub974\uba74 <strong>\uc9e7\uc740 \ucabd \uae30\uc900<\/strong>\uc73c\ub85c \ubb36\uc784<\/li>\n<\/ul>\n<pre><code class=\"language-python line-numbers\">zip(iterable1, iterable2, ...)\n<\/code><\/pre>\n<h2>\ud83d\udcab <code>dict(zip(...))<\/code> \ud65c\uc6a9<\/h2>\n<ol>\n<li>\ub450 \ub9ac\uc2a4\ud2b8 \ubb36\uae30<\/li>\n<\/ol>\n<pre><code class=\"language-python line-numbers\">z = zip(name, age)\nprint(list(z)) #[('may', 17), ('kein', 19)]\n<\/code><\/pre>\n<ol>\n<li>\ub515\uc154\ub108\ub9ac \ub9cc\ub4e4\uae30<\/li>\n<\/ol>\n<pre><code class=\"language-python line-numbers\">dic = dict(zip(name, age))\nprint(dic) #{'may': 17, 'kein': 19}\n<\/code><\/pre>\n<ol>\n<li>3\uac1c \uc774\uc0c1<\/li>\n<\/ol>\n<pre><code class=\"language-python line-numbers\">a = [1, 2, 3]\nb = [\"one\", \"two\", \"three\"]\nc = [\"\ud558\ub098\", \"\ub458\", \"\uc14b\"]\n\nprint(list(zip(a, b, c))) #[(1, 'one', '\ud558\ub098'), (2, 'two', '\ub458'), (3, 'three', '\uc14b')]\n\n<\/code><\/pre>\n<h2>\ud83d\udcab <code>zip(*)<\/code> \uc5b8\ud328\ud0b9<\/h2>\n<pre><code class=\"language-python line-numbers\">pairs = [('may', 17), ('kein', 19)]\nname, age = zip(*pairs)\n\nprint(name)   # ('may', 'kein')\nprint(age)  # (17, 19)\n<\/code><\/pre>\n<h2>\ud83d\udcab \uc815\ub9ac<\/h2>\n<ul>\n<li>\ub370\uc774\ud130\uac00 \ub9ce\uc744\uc218\ub85d <code>dict(zip(...))<\/code> \ubc29\uc2dd\uc774 \uac00\uc7a5 \ube60\ub984<\/li>\n<li>\uac00\ub3c5\uc131\uacfc \ud30c\uc774\uc36c\uc2a4\ub7ec\uc6b4 \ucf54\ub4dc \u2192 <code>dict comprehension<\/code><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udcab \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\ub294 \ubc29\ubc95 name = [&#8220;may&#8221;, &#8220;kein&#8221;] age = [17, 19] for \ub8e8\ud504 \ubc29\uc2dd dic = {} for i in range(len(name)): dic[name[i]] = age[i] dict comprehension dic = {n: y for n, y in zip(name, age)} dict(zip(&#8230;)) dic = dict(zip(name, age)) \ud83d\udcab dict(zip(&#8230;)) \ud568\uc218\ub780? \ud30c\uc774\uc36c\uc5d0\uc11c \uc5ec\ub7ec \uc2dc\ud000\uc2a4(\ub9ac\uc2a4\ud2b8, \ud29c\ud50c \ub4f1)\ub97c \ubb36\uc5b4\uc8fc\ub294 \ud568\uc218 \uac19\uc740 \uc778\ub371\uc2a4\ub07c\ub9ac [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41,49],"tags":[42],"class_list":["post-1316","post","type-post","status-publish","format-standard","hentry","category-python","category-system-development","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Python] \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\uae30(zip) - Dozzing World<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.dozzing.kr\/?p=1316\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Python] \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\uae30(zip) - Dozzing World\" \/>\n<meta property=\"og:description\" content=\"\ud83d\udcab \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\ub294 \ubc29\ubc95 name = [&quot;may&quot;, &quot;kein&quot;] age = [17, 19] for \ub8e8\ud504 \ubc29\uc2dd dic = {} for i in range(len(name)): dic[name[i]] = age[i] dict comprehension dic = {n: y for n, y in zip(name, age)} dict(zip(...)) dic = dict(zip(name, age)) \ud83d\udcab dict(zip(...)) \ud568\uc218\ub780? \ud30c\uc774\uc36c\uc5d0\uc11c \uc5ec\ub7ec \uc2dc\ud000\uc2a4(\ub9ac\uc2a4\ud2b8, \ud29c\ud50c \ub4f1)\ub97c \ubb36\uc5b4\uc8fc\ub294 \ud568\uc218 \uac19\uc740 \uc778\ub371\uc2a4\ub07c\ub9ac [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.dozzing.kr\/?p=1316\" \/>\n<meta property=\"og:site_name\" content=\"Dozzing World\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-24T08:30:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-24T08:31:33+00:00\" \/>\n<meta name=\"author\" content=\"Dozzing\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dozzing\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.dozzing.kr\/?p=1316\",\"url\":\"https:\/\/blog.dozzing.kr\/?p=1316\",\"name\":\"[Python] \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\uae30(zip) - Dozzing World\",\"isPartOf\":{\"@id\":\"https:\/\/blog.dozzing.kr\/#website\"},\"datePublished\":\"2023-01-24T08:30:53+00:00\",\"dateModified\":\"2025-10-24T08:31:33+00:00\",\"author\":{\"@id\":\"https:\/\/blog.dozzing.kr\/#\/schema\/person\/52258baef65b530d3e867e4c1f79c36f\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.dozzing.kr\/?p=1316#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.dozzing.kr\/?p=1316\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.dozzing.kr\/?p=1316#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.dozzing.kr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Python] \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\uae30(zip)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.dozzing.kr\/#website\",\"url\":\"https:\/\/blog.dozzing.kr\/\",\"name\":\"Dozzing World\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.dozzing.kr\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.dozzing.kr\/#\/schema\/person\/52258baef65b530d3e867e4c1f79c36f\",\"name\":\"Dozzing\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/blog.dozzing.kr\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0bbe3fe675c3641965411ffb61a1368b3bf05e794deaa3c7bd0ef7b4690a614a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0bbe3fe675c3641965411ffb61a1368b3bf05e794deaa3c7bd0ef7b4690a614a?s=96&d=mm&r=g\",\"caption\":\"Dozzing\"},\"sameAs\":[\"https:\/\/blog.dozzing.kr\/\"],\"url\":\"https:\/\/blog.dozzing.kr\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Python] \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\uae30(zip) - Dozzing World","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.dozzing.kr\/?p=1316","og_locale":"ko_KR","og_type":"article","og_title":"[Python] \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\uae30(zip) - Dozzing World","og_description":"\ud83d\udcab \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\ub294 \ubc29\ubc95 name = [\"may\", \"kein\"] age = [17, 19] for \ub8e8\ud504 \ubc29\uc2dd dic = {} for i in range(len(name)): dic[name[i]] = age[i] dict comprehension dic = {n: y for n, y in zip(name, age)} dict(zip(...)) dic = dict(zip(name, age)) \ud83d\udcab dict(zip(...)) \ud568\uc218\ub780? \ud30c\uc774\uc36c\uc5d0\uc11c \uc5ec\ub7ec \uc2dc\ud000\uc2a4(\ub9ac\uc2a4\ud2b8, \ud29c\ud50c \ub4f1)\ub97c \ubb36\uc5b4\uc8fc\ub294 \ud568\uc218 \uac19\uc740 \uc778\ub371\uc2a4\ub07c\ub9ac [&hellip;]","og_url":"https:\/\/blog.dozzing.kr\/?p=1316","og_site_name":"Dozzing World","article_published_time":"2023-01-24T08:30:53+00:00","article_modified_time":"2025-10-24T08:31:33+00:00","author":"Dozzing","twitter_card":"summary_large_image","twitter_misc":{"\uae00\uc4f4\uc774":"Dozzing","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"2\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.dozzing.kr\/?p=1316","url":"https:\/\/blog.dozzing.kr\/?p=1316","name":"[Python] \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\uae30(zip) - Dozzing World","isPartOf":{"@id":"https:\/\/blog.dozzing.kr\/#website"},"datePublished":"2023-01-24T08:30:53+00:00","dateModified":"2025-10-24T08:31:33+00:00","author":{"@id":"https:\/\/blog.dozzing.kr\/#\/schema\/person\/52258baef65b530d3e867e4c1f79c36f"},"breadcrumb":{"@id":"https:\/\/blog.dozzing.kr\/?p=1316#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.dozzing.kr\/?p=1316"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.dozzing.kr\/?p=1316#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.dozzing.kr\/"},{"@type":"ListItem","position":2,"name":"[Python] \ub9ac\uc2a4\ud2b8\ub97c \ub515\uc154\ub108\ub9ac\ub85c \ubcc0\ud658\ud558\uae30(zip)"}]},{"@type":"WebSite","@id":"https:\/\/blog.dozzing.kr\/#website","url":"https:\/\/blog.dozzing.kr\/","name":"Dozzing World","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.dozzing.kr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Person","@id":"https:\/\/blog.dozzing.kr\/#\/schema\/person\/52258baef65b530d3e867e4c1f79c36f","name":"Dozzing","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/blog.dozzing.kr\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0bbe3fe675c3641965411ffb61a1368b3bf05e794deaa3c7bd0ef7b4690a614a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0bbe3fe675c3641965411ffb61a1368b3bf05e794deaa3c7bd0ef7b4690a614a?s=96&d=mm&r=g","caption":"Dozzing"},"sameAs":["https:\/\/blog.dozzing.kr\/"],"url":"https:\/\/blog.dozzing.kr\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=\/wp\/v2\/posts\/1316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1316"}],"version-history":[{"count":1,"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=\/wp\/v2\/posts\/1316\/revisions"}],"predecessor-version":[{"id":1317,"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=\/wp\/v2\/posts\/1316\/revisions\/1317"}],"wp:attachment":[{"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.dozzing.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}