{"id":838,"date":"2021-06-17T18:08:33","date_gmt":"2021-06-17T09:08:33","guid":{"rendered":"http:\/\/www.mamacoding.com\/?p=838"},"modified":"2021-06-18T16:52:08","modified_gmt":"2021-06-18T07:52:08","slug":"python%ed%8c%8c%ec%9d%b4%ec%8d%ac-%ed%94%bc%eb%b3%b4%eb%82%98%ec%b9%98%ec%88%98%ec%97%b4-%ea%b5%ac%ed%95%98%ea%b8%b0%ec%a0%9c%eb%84%88%eb%a0%88%ec%9d%b4%ed%84%b0-%ec%82%ac%ec%9a%a9","status":"publish","type":"post","link":"http:\/\/www.mamacoding.com\/?p=838","title":{"rendered":"Python(\ud30c\uc774\uc36c)- \ud53c\ubcf4\ub098\uce58\uc218\uc5f4 \uad6c\ud558\uae30(\uc81c\ub108\ub808\uc774\ud130 \uc0ac\uc6a9)"},"content":{"rendered":"<p id=\"SE-8b8a48de-734f-4c63-aa90-2425ec606568\" class=\"se-text-paragraph se-text-paragraph-align- \"><span id=\"SE-b508a98a-159b-42a2-b468-bdc2ab4f977c\" class=\"se-fs- se-ff- \"><b>\ud53c\ubcf4\ub098\uce58\uc218\uc5f4\uc740 \uccab\uc9f8 \ubc0f \ub458\uc9f8\uac00 1\uc774\uba70 \uadf8 \uc774\ud6c4\uc758 \ubaa8\ub4e0 \ud56d\uc740 \ubc14\ub85c \uc55e \ub450 \uc218\uc758 \ud569\uc778 \uc218\uc5f4\uc774\ub2e4.<\/b><\/span><\/p>\n<p id=\"SE-7fbd3273-6927-4f3e-accf-514b606725c3\" class=\"se-text-paragraph se-text-paragraph-align- \"><span id=\"SE-fc20a8da-3c92-4835-a7a3-b1eec2304412\" class=\"se-fs- se-ff- \"><b>\uc81c\ub108\ub808\uc774\ud130 (generator)<\/b><\/span><span id=\"SE-c2b25f04-5748-4366-b366-8c893cfa5a4f\" class=\"se-fs- se-ff- \">\ub294 \ud30c\uc774\uc36c \uc2dc\ud000\uc2a4\ub97c \uc0dd\uc131\ud558\ub294 \uac1d\uccb4\uc774\ub2e4. \uc81c\ub108\ub808\uc774\ud130\ub97c \uc774\uc6a9\ud558\uba74 \uc804\uccb4 \uc2dc\ud000\uc2a4\ub97c \ud55c \ubc88\uc5d0 \uba54\ubaa8\ub9ac\uc5d0 \uc0dd\uc131\ud558\uace0 \uc815\ub82c\ud560 \ud544\uc694\uc5c6\uc774 \uc7a0\uc7ac\uc801\uc73c\ub85c \uc544\uc8fc \ud070 \uc2dc\ud000\uc2a4\ub97c \uc21c\ud68c\ud560 \uc218 \uc788\ub2e4. \uc81c\ub108\ub808\uc774\ud130\ub97c \uc21c\ud68c\ud560 \ub54c \ub9c8\ub2e4 \ub9c8\uc9c0\ub9c9\uc73c\ub85c \ud638\ucd9c\ub41c \uc694\uc18c\ub97c \uae30\uc5b5\ud558\uace0 \ub2e4\uc74c \uac12\uc744 \ubc18\ud658\ud55c\ub2e4. <\/span><\/p>\n<p id=\"SE-627a2b00-e5a6-4b98-8c9b-c1de38faaebf\" class=\"se-text-paragraph se-text-paragraph-align- \"><span id=\"SE-ac5ef1b6-44ff-4b1f-8705-1cc5c64b8837\" class=\"se-fs- se-ff- \">\uc81c\ub108\ub808\uc774\ud130 \ud568\uc218\ub294 <\/span><span id=\"SE-8919654e-d038-4849-88a4-5f8edb441e41\" class=\"se-fs- se-ff- \"><b>yield<\/b><\/span><span id=\"SE-84aab807-64a2-4d80-b7da-d3f7364518cf\" class=\"se-fs- se-ff- \">\ubb38\uc744 \uc0ac\uc6a9\ud55c\ub2e4.<\/span><\/p>\n<hr \/>\n<div class=\"se-module se-module-text\">\n<p id=\"SE-4e33b79c-6ac2-4c06-8caf-74ea96cec0b4\" class=\"se-text-paragraph se-text-paragraph-align- \"><span id=\"SE-0d068392-ffb1-42e1-948e-a3315fa764a6\" class=\"se-fs- se-ff- \"><b>def fib_generator():<\/b><\/span><\/p>\n<\/div>\n<div class=\"se-module se-module-text\">\n<p id=\"SE-f980aab2-f074-49dd-8906-7a35225169a9\" class=\"se-text-paragraph se-text-paragraph-align- \"><span id=\"SE-d1a72587-31ee-42a5-bf07-f52c2918a6f3\" class=\"se-fs- se-ff- \"><b>a, b = 0, 1<\/b><\/span><\/p>\n<\/div>\n<div class=\"se-module se-module-text\">\n<p id=\"SE-bf1bde10-c615-41d6-bdfa-05303611c6d8\" class=\"se-text-paragraph se-text-paragraph-align- \"><span id=\"SE-95afc747-a8d5-4377-8c04-2c9e50a5242e\" class=\"se-fs- se-ff- \"><b>while True:<\/b><\/span><\/p>\n<\/div>\n<div class=\"se-module se-module-text\">\n<p id=\"SE-6c951b1a-0e2d-4740-b213-3747faf38dce\" class=\"se-text-paragraph se-text-paragraph-align- \"><span id=\"SE-537a9372-0ad2-4af5-8ead-e2c45b64b819\" class=\"se-fs- se-ff- \"><b>yield b<\/b><\/span><\/p>\n<\/div>\n<div class=\"se-module se-module-text\">\n<p id=\"SE-1a1dadf3-9305-497e-82b8-2932f1bf4a17\" class=\"se-text-paragraph se-text-paragraph-align- \"><span id=\"SE-76e13b71-f745-4d6e-b96f-a63870e1169f\" class=\"se-fs- se-ff- \"><b>a, b = b, a+b<\/b><\/span><\/p>\n<\/div>\n<div class=\"se-module se-module-text\">\n<p id=\"SE-6d094e6a-40bf-4499-a724-cb86ef23485e\" class=\"se-text-paragraph se-text-paragraph-align- \"><span id=\"SE-7fdc97fc-42cb-43d8-bc92-c28f74881dff\" class=\"se-fs- se-ff- \"><b>\u200b<\/b><\/span><\/p>\n<\/div>\n<div class=\"se-module se-module-text\">\n<p id=\"SE-9cabf8e2-08fd-401a-9f7c-269f50a34935\" class=\"se-text-paragraph se-text-paragraph-align- \"><span id=\"SE-6c9898ee-59dd-47c7-b3af-b8b0597178d8\" class=\"se-fs- se-ff- \"><b>fg = fib_generator()<\/b><\/span><\/p>\n<\/div>\n<div class=\"se-module se-module-text\">\n<p id=\"SE-8d3eb963-1ddb-4993-8a4d-9e48f43857e2\" class=\"se-text-paragraph se-text-paragraph-align- \"><span id=\"SE-09324ce7-a973-4bf9-9887-0d1d3ec2b00e\" class=\"se-fs- se-ff- \"><b>for\u00a0n in range(10):<\/b><\/span><\/p>\n<\/div>\n<div class=\"se-module se-module-text\">\n<p id=\"SE-cb800eac-b3e6-4cbb-affe-589cd4316da2\" class=\"se-text-paragraph se-text-paragraph-align- \"><span id=\"SE-fd67784b-b14a-48dc-a863-6e85f4e58f75\" class=\"se-fs- se-ff- \"><b>print(next(fg), end=&#8221; &#8220;)<\/b><\/span><\/p>\n<div class=\"autosourcing-stub-extra\"><\/div>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>\uc2e4\ud589\ud654\uba74<\/p>\n<\/div>\n<div class=\"se-module se-module-text\">\n<hr \/>\n<p>1 1 2 3 5 8 13 21 34 55<\/p>\n<\/div>\n<div class=\"se-module se-module-text\">\n<hr \/>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\ud53c\ubcf4\ub098\uce58\uc218\uc5f4\uc740 \uccab\uc9f8 \ubc0f \ub458\uc9f8\uac00 1\uc774\uba70 \uadf8 \uc774\ud6c4\uc758 \ubaa8\ub4e0 \ud56d\uc740 \ubc14\ub85c \uc55e \ub450 \uc218\uc758 \ud569\uc778 \uc218\uc5f4\uc774\ub2e4. \uc81c\ub108\ub808\uc774\ud130 (generator)\ub294 \ud30c\uc774\uc36c \uc2dc\ud000\uc2a4\ub97c \uc0dd\uc131\ud558\ub294 \uac1d\uccb4\uc774\ub2e4. \uc81c\ub108\ub808\uc774\ud130\ub97c \uc774\uc6a9\ud558\uba74 \uc804\uccb4 \uc2dc\ud000\uc2a4\ub97c \ud55c \ubc88\uc5d0 \uba54\ubaa8\ub9ac\uc5d0 \uc0dd\uc131\ud558\uace0 \uc815\ub82c\ud560 \ud544\uc694\uc5c6\uc774 \uc7a0\uc7ac\uc801\uc73c\ub85c \uc544\uc8fc \ud070 \uc2dc\ud000\uc2a4\ub97c \uc21c\ud68c\ud560 \uc218 \uc788\ub2e4. \uc81c\ub108\ub808\uc774\ud130\ub97c \uc21c\ud68c\ud560 \ub54c \ub9c8\ub2e4 \ub9c8\uc9c0\ub9c9\uc73c\ub85c \ud638\ucd9c\ub41c \uc694\uc18c\ub97c \uae30\uc5b5\ud558\uace0 \ub2e4\uc74c \uac12\uc744 \ubc18\ud658\ud55c\ub2e4. \uc81c\ub108\ub808\uc774\ud130 \ud568\uc218\ub294 yield\ubb38\uc744 \uc0ac\uc6a9\ud55c\ub2e4. def fib_generator(): &hellip; <a href=\"http:\/\/www.mamacoding.com\/?p=838\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;Python(\ud30c\uc774\uc36c)- \ud53c\ubcf4\ub098\uce58\uc218\uc5f4 \uad6c\ud558\uae30(\uc81c\ub108\ub808\uc774\ud130 \uc0ac\uc6a9)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[29],"tags":[36,62],"_links":{"self":[{"href":"http:\/\/www.mamacoding.com\/index.php?rest_route=\/wp\/v2\/posts\/838"}],"collection":[{"href":"http:\/\/www.mamacoding.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mamacoding.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mamacoding.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mamacoding.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=838"}],"version-history":[{"count":2,"href":"http:\/\/www.mamacoding.com\/index.php?rest_route=\/wp\/v2\/posts\/838\/revisions"}],"predecessor-version":[{"id":840,"href":"http:\/\/www.mamacoding.com\/index.php?rest_route=\/wp\/v2\/posts\/838\/revisions\/840"}],"wp:attachment":[{"href":"http:\/\/www.mamacoding.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mamacoding.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=838"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mamacoding.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}