{"id":1180,"date":"2019-11-20T21:41:56","date_gmt":"2019-11-20T13:41:56","guid":{"rendered":"http:\/\/vip.fxxkpython.com\/?p=1180"},"modified":"2020-03-09T22:28:24","modified_gmt":"2020-03-09T14:28:24","slug":"python-%e7%88%ac%e9%98%b6%e6%a2%af-%e4%bb%80%e4%b9%88%e6%98%af-python-%e7%9a%84%e5%8f%af%e8%bf%ad%e4%bb%a3%e5%af%b9%e8%b1%a1%e3%80%81%e8%bf%ad%e4%bb%a3%e5%99%a8%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/vip.fxxkpython.com\/?p=1180","title":{"rendered":"Python \u722c\u9636\u68af | \u4ec0\u4e48\u662f Python \u7684\u53ef\u8fed\u4ee3\u5bf9\u8c61\u3001\u8fed\u4ee3\u5668\uff1f"},"content":{"rendered":"\n<p>\u6211\u4eec\u4e4b\u524d\u8bb2\u8fc7\u4e00\u4e9b\u8bf8\u5982\u5217\u8868\u3001\u5b57\u5178\u3001\u5143\u7ec4\u3001\u96c6\u5408..\u8fd9\u4e9b\u90fd\u662f\u53ef\u4ee5\u628a\u6570\u636e\u4e00\u4e2a\u4e00\u4e2a\u5c01\u88c5\u8d77\u6765\uff0c\u53ea\u4e0d\u8fc7\u5b83\u4eec\u5404\u81ea\u5bf9\u5176\u4e2d\u7684\u5143\u7d20\u7684 \u201c\u5b89\u6392\u65b9\u5f0f\u201d  \u5404\u4e0d\u76f8\u540c\uff0c\u6211\u4eec\u628a\u5b83\u4eec\u7edf\u79f0\u4e3a<strong>\u5bb9\u5668\uff0c<\/strong>\u8fd9\u4e9b\u5bb9\u5668\u6709\u4e00\u4e2a\u7279\u70b9\uff0c\u5c31\u662f\u4ed6\u53ef\u4ee5\u88ab\u5faa\u73af\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>for i in \u5bb9\u5668\uff1a<\/p><\/blockquote>\n\n\n\n<h2>\u4ec0\u4e48\u662f\u53ef\u8fed\u4ee3\u5bf9\u8c61<\/h2>\n\n\n\n<p>\u8fd9\u4e9b\u53ef\u4ee5\u88ab for \u5faa\u73af\u7684\u5bb9\u5668\uff08\u5bf9\u8c61\uff09\uff0c\u6211\u4eec\u5c31\u8bf4\u5b83\u662f\u53ef\u8fed\u4ee3\u7684\uff0c\u4e5f\u5c31\u662f<strong>\u53ef\u8fed\u4ee3\u5bf9\u8c61\uff0c\u662f\u00a0Iterable\u00a0\u7684\u3002<\/strong><\/p>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7 isinstance \u6765\u5224\u65ad\u8fd9\u4e2a\u5bf9\u8c61\u662f\u4e0d\u662f\u53ef\u8fed\u4ee3\u7684\uff1a<div style=\"text-align:center;border:1px dashed #FF9A9A;padding:8px;margin:10px auto;color:#FF6666;\">\u672c\u6587\u9690\u85cf\u5185\u5bb9 <a href=\"https:\/\/vip.fxxkpython.com\/wp-login.php?redirect_to=https%3A%2F%2Fvip.fxxkpython.com%2F%3Fp%3D1180\">\u767b\u9646<\/a> \u540e\u624d\u53ef\u4ee5\u6d4f\u89c8<\/div><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4eec\u4e4b\u524d\u8bb2\u8fc7\u4e00\u4e9b\u8bf8\u5982\u5217\u8868\u3001\u5b57\u5178\u3001\u5143\u7ec4\u3001\u96c6\u5408..\u8fd9\u4e9b\u90fd\u662f\u53ef\u4ee5\u628a\u6570\u636e\u4e00\u4e2a\u4e00\u4e2a\u5c01\u88c5\u8d77\u6765\uff0c\u53ea\u4e0d\u8fc7\u5b83\u4eec\u5404\u81ea\u5bf9\u5176\u4e2d\u7684\u5143\u7d20\u7684 \u201c\u5b89\u6392\u65b9\u5f0f\u201d \u5404\u4e0d\u76f8\u540c\uff0c\u6211\u4eec\u628a\u5b83\u4eec\u7edf\u79f0\u4e3a\u5bb9\u5668\uff0c\u8fd9\u4e9b\u5bb9\u5668\u6709\u4e00\u4e2a\u7279\u70b9\uff0c\u5c31\u662f\u4ed6\u53ef\u4ee5\u88ab\u5faa\u73af\uff1a for i in \u5bb9\u5668\uff1a \u4ec0\u4e48\u662f\u53ef\u8fed\u4ee3\u5bf9\u8c61 \u8fd9\u4e9b\u53ef\u4ee5&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[140],"tags":[173,171,172,166,141,169,163,170],"_links":{"self":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/1180"}],"collection":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1180"}],"version-history":[{"count":2,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/1180\/revisions"}],"predecessor-version":[{"id":4137,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/1180\/revisions\/4137"}],"wp:attachment":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}