{"id":3320,"date":"2021-11-19T09:29:29","date_gmt":"2021-11-19T01:29:29","guid":{"rendered":"\/?p=3320"},"modified":"2021-11-21T09:29:53","modified_gmt":"2021-11-21T01:29:53","slug":"5-%e5%85%83%e7%bb%84","status":"publish","type":"post","link":"http:\/\/xinblog.ltd\/?p=3320","title":{"rendered":"5.\u5143\u7ec4"},"content":{"rendered":"<p>\u5143\u7ec4\u7684\u573a\u666f\u9002\u5408\u4e8e\u5b58\u50a8\u591a\u4e2a\u6570\u636e,\u4f46\u662f\u6570\u636e\u662f\u4e0d\u80fd\u4fee\u6539\u7684<\/p>\n<p>\u90a3\u4e48\u5c31\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u5143\u7ec4<\/p>\n<p>num_list = (10,20,30)<\/p>\n<p>\u5143\u7ec4\u7684\u5b9a\u4e49\u57fa\u672c\u5982\u4e0a,\u4f7f\u7528\u5c0f\u62ec\u53f7,\u9017\u53f7\u8fdb\u884c\u95f4\u9694,\u6570\u636e\u7c7b\u578b\u4e0d\u56fa\u5b9a<\/p>\n<p>\u4f46\u662f\u5982\u679c\u53ea\u6709\u4e00\u4e2a\u6570\u636e\u7684\u8bdd,\u6700\u597d\u5728\u540e\u9762\u6dfb\u52a0\u9017\u53f7,\u4e0d\u7136\u53ef\u80fd\u4f1a\u88abPython\u7684\u89e3\u91ca\u5668\u89e3\u91ca\u4e3a\u7b97\u6570\u8868\u8fbe\u5f0f<\/p>\n<p>num_list = (10,)<\/p>\n<p>\u5176\u5e38\u89c1\u7684\u64cd\u4f5c\u5982\u4e0b<\/p>\n<p>\u7531\u4e8e\u4e0d\u652f\u6301\u4fee\u6539,\u53ea\u652f\u6301\u67e5\u627e,\u6545<\/p>\n<p>tuple[0]<\/p>\n<p>index(),\u67e5\u627e\u67d0\u4e2a\u6570\u636e,\u5b58\u5728\u5c31\u8fd4\u56de\u4e0b\u6807,\u4e0d\u7136\u5c31\u62a5\u9519<\/p>\n<p>count()\u00a0\u7edf\u8ba1\u67d0\u4e2a\u5143\u7d20\u7684\u51fa\u73b0\u6b21\u6570<\/p>\n<p>len()\u00a0\u7edf\u8ba1\u5143\u7ec4\u4e2d\u6570\u636e\u7684\u4e2a\u6570<\/p>\n<p>\u5982\u679c\u5143\u7ec4\u4e2d\u6709\u5f15\u7528\u5bf9\u8c61,\u662f\u652f\u6301\u4fee\u6539\u7684<\/p>\n<p>tuple2 = (10,20,30,[&#8216;a&#8217;,&#8217;b&#8217;,&#8217;c&#8217;])<\/p>\n<p>tuple2[3][1] = &#8216;e&#8217;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5143\u7ec4\u7684\u573a\u666f\u9002\u5408\u4e8e\u5b58\u50a8\u591a\u4e2a\u6570\u636e, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"_links":{"self":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts\/3320"}],"collection":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3320"}],"version-history":[{"count":0,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts\/3320\/revisions"}],"wp:attachment":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3320"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}