{"id":134679,"date":"2020-07-08T22:46:37","date_gmt":"2020-07-08T14:46:37","guid":{"rendered":"http:\/\/4563.org\/?p=134679"},"modified":"2020-07-08T22:46:37","modified_gmt":"2020-07-08T14:46:37","slug":"%e6%96%b0%e6%89%8b%e9%97%ae-python-%e9%87%8c%e7%9a%84%e5%ad%97%e5%85%b8%e5%8f%aa%e8%83%bd%e4%b8%a4%e4%b8%a4%e4%b8%80%e7%bb%84%e4%b9%88%ef%bc%9f%e6%88%91%e6%83%b3%e6%94%be%e4%b8%89%e5%9b%9b%e4%ba%94","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=134679","title":{"rendered":"\u65b0\u624b\u95ee Python \u91cc\u7684\u5b57\u5178\u53ea\u80fd\u4e24\u4e24\u4e00\u7ec4\u4e48\uff1f\u6211\u60f3\u653e\u4e09\u56db\u4e94\u516d\u4e03\u4e00\u7ec4\u600e\u4e48\u529e\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u65b0\u624b\u95ee Python \u91cc\u7684\u5b57\u5178\u53ea\u80fd\u4e24\u4e24\u4e00\u7ec4\u4e48\uff1f\u6211\u60f3\u653e\u4e09\u56db\u4e94\u516d\u4e03\u4e00\u7ec4\u600e\u4e48\u529e\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Ninesir <\/span>  <span><i><\/i> 6<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u521a\u5b66\u4e24\u5929<\/p>\n<p>\u65b0\u624b\u95ee python \u91cc\u7684\u5b57\u5178\u53ea\u80fd\u4e24\u4e24\u4e00\u7ec4\u4e48\uff1f\u6211\u60f3\u653e\u4e09\u56db\u4e94\u516d\u4e03\u4e00\u7ec4\u600e\u4e48\u529e\uff1f<br \/>dic = {&#8216;\u7532&#8217;:&#8217;A&#8217;:1,&#8217;\u4e59&#8217;:&#8217;B&#8217;:8,&#8217;\u4e19&#8217;:&#8217;C&#8217;:3}      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"2475225\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Trim21 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             dic = {&#8216;\u7532&#8217;:{&#8216;A&#8217;:1},&#8217;\u4e59&#8217;:{&#8216;B&#8217;:8},&#8217;\u4e19&#8217;:{&#8216;C&#8217;:3}}                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2475226\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Ninesir <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Trim21 \u53ea\u80fd\u4e24\u4e24\u4e00\u7ec4\u5d4c\u5957\u662f\u5427\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2475227\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : MooRider <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             dict \u7684 value \u4e0d\u4e00\u5b9a\u4e3a str, \u53ef\u4ee5\u4e3a\u4e00\u4e2a list, touple \u6216\u8005\u662f dict.<br \/>\u6240\u4ee5\u53ea\u9700\u8981{&#8220;A&#8221;:[list1,list2]}<br \/>\u6216\u8005\u50cf\u4e00\u90a3\u6837\u5c31\u884c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2475228\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : JieS <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u952e\u503c\u5bf9\uff0ckey: value\uff0c\u952e\u548c\u503c\u53ea\u80fd\u4e3a\u4e00\u4e2a\u5bf9\u8c61\u2026 <br \/>&#8220;name&#8221;:[&#8220;\u5c0f\u660e&#8221;,&#8221;\u5c0f\u767d&#8221;] <br \/>\u53ef\u4ee5\u7528\u5217\u8868\u6765\u5d4c\u5957\u591a\u4e2a\u503c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2475229\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : InkStone <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u9664\u4e86\u4e00\u7684\u5199\u6cd5\u4e4b\u5916\uff0c\u8fd8\u53ef\u4ee5\u7528 tuple \u505a key \u3002<\/p>\n<p>\u4e0d\u8fc7 tuple \u6709\u4e2a\u7f3a\u70b9\uff0c\u5b83\u662f\u6709\u5e8f\u7684\u3002<br \/>\u4f60\u53ef\u4ee5\u81ea\u5df1\u5b9e\u73b0\u4e00\u4e2a\u7c7b\uff0c\u5185\u90e8\u7528 set\uff0c\u7136\u540e\u628a\u5b83\u5199\u6210 hashable \u7684\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u652f\u6301 unordered tuple\u2026\u2026\u751a\u81f3\u8fd8\u80fd\u652f\u6301\u90e8\u5206\u5339\u914d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2475230\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : edk24 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             list = [[&#8216;\u7532&#8217;, &#8216;A&#8217;, 1], &#8230;]<\/p>\n<p>\u7528\u5217\u8868\u4e5f\u7965\u5440 \u54c8\u54c8                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2475231\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lithbitren <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             frozenset \u5c31\u662f\u53ef hash \u7684 set                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2475232\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : volvo007 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ea\u80fd\u5185\u90e8\u5d4c\u5957\uff0c\u9664\u4e86\u5143\u7ec4\uff0c\u4e5f\u53ef\u4ee5\u5728\u5185\u90e8\u5d4c\u5957 named tuple \u8fd9\u79cd\u7c7b\u578b<\/p>\n<p>set \u7684\u8bdd\uff0c\u611f\u89c9\u5e76\u4e0d\u662f\u4e00\u4e2a\u5f88\u9ad8\u6548\u7684\u6570\u636e\u7ed3\u6784\uff0c\u8fd8\u662f\u907f\u514d\u76f4\u63a5\u7528\u5427                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u65b0\u624b\u95ee Python \u91cc\u7684\u5b57\u5178\u53ea\u80fd&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/134679"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=134679"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/134679\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=134679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=134679"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=134679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}