{"id":1061695,"date":"2024-12-31T15:44:59","date_gmt":"2024-12-31T07:44:59","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1061695.html"},"modified":"2024-12-31T15:45:01","modified_gmt":"2024-12-31T07:45:01","slug":"python%e5%a6%82%e4%bd%95%e6%89%93%e5%87%ba%e5%ad%97%e5%85%b8%e9%87%8c%e7%9a%84%e5%85%83%e7%b4%a0","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1061695.html","title":{"rendered":"python\u5982\u4f55\u6253\u51fa\u5b57\u5178\u91cc\u7684\u5143\u7d20"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/9bf0fc88-e74e-4cfe-b34f-fbc8b2f6a283.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u6253\u51fa\u5b57\u5178\u91cc\u7684\u5143\u7d20\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u6253\u51fa\u5b57\u5178\u91cc\u7684\u5143\u7d20\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\uff0c\u4f8b\u5982\uff0c\u4f7f\u7528key\u8bbf\u95ee\u3001\u4f7f\u7528items()\u65b9\u6cd5\u3001\u4f7f\u7528keys()\u65b9\u6cd5\u3001\u4f7f\u7528values()\u65b9\u6cd5\u7b49\u3002\u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u901a\u8fc7\u5b57\u5178\u7684key\u8bbf\u95ee\u7279\u5b9a\u5143\u7d20\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4ee3\u7801\u8be6\u7ec6\u4e86\u89e3\u8fd9\u4e9b\u65b9\u6cd5\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u4e00\u4e2a\u5b57\u5178<\/p>\n<p>my_dict = {<\/p>\n<p>    &#39;name&#39;: &#39;Alice&#39;,<\/p>\n<p>    &#39;age&#39;: 25,<\/p>\n<p>    &#39;city&#39;: &#39;New York&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u901a\u8fc7key\u8bbf\u95ee\u5b57\u5178\u5143\u7d20<\/strong><\/h2>\n<p>print(my_dict[&#39;name&#39;])  # \u8f93\u51fa: Alice<\/p>\n<h2><strong>\u4f7f\u7528items()\u65b9\u6cd5\u904d\u5386\u5b57\u5178\u5143\u7d20<\/strong><\/h2>\n<p>for key, value in my_dict.items():<\/p>\n<p>    print(f&quot;{key}: {value}&quot;)<\/p>\n<h2><strong>\u4f7f\u7528keys()\u65b9\u6cd5\u83b7\u53d6\u6240\u6709\u952e<\/strong><\/h2>\n<p>for key in my_dict.keys():<\/p>\n<p>    print(key)<\/p>\n<h2><strong>\u4f7f\u7528values()\u65b9\u6cd5\u83b7\u53d6\u6240\u6709\u503c<\/strong><\/h2>\n<p>for value in my_dict.values():<\/p>\n<p>    print(value)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u901a\u8fc7key\u8bbf\u95ee\u662f\u6700\u5e38\u7528\u7684\u65b9\u6cd5\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u76f4\u63a5\u83b7\u53d6\u6307\u5b9akey\u5bf9\u5e94\u7684\u503c\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001\u901a\u8fc7key\u8bbf\u95ee\u5b57\u5178\u5143\u7d20<\/p>\n<\/p>\n<p><p>\u901a\u8fc7key\u8bbf\u95ee\u5b57\u5178\u5143\u7d20\u662f\u6700\u76f4\u63a5\u548c\u5e38\u7528\u7684\u65b9\u6cd5\u3002\u5b57\u5178\u662f\u4e00\u79cd\u952e\u503c\u5bf9\u7684\u6570\u636e\u7ed3\u6784\uff0c\u901a\u8fc7key\u53ef\u4ee5\u5feb\u901f\u8bbf\u95ee\u5bf9\u5e94\u7684value\u3002\u4e0b\u9762\u662f\u5177\u4f53\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u4e00\u4e2a\u5b57\u5178<\/p>\n<p>my_dict = {<\/p>\n<p>    &#39;name&#39;: &#39;Alice&#39;,<\/p>\n<p>    &#39;age&#39;: 25,<\/p>\n<p>    &#39;city&#39;: &#39;New York&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u901a\u8fc7key\u8bbf\u95ee\u5b57\u5178\u5143\u7d20<\/strong><\/h2>\n<p>name = my_dict[&#39;name&#39;]<\/p>\n<p>age = my_dict[&#39;age&#39;]<\/p>\n<p>city = my_dict[&#39;city&#39;]<\/p>\n<p>print(f&quot;Name: {name}, Age: {age}, City: {city}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u901a\u8fc7\u5b57\u5178\u7684key &#39;name&#39;\u3001&#39;age&#39; \u548c &#39;city&#39; \u76f4\u63a5\u83b7\u53d6\u4e86\u5bf9\u5e94\u7684\u503c\uff0c\u7136\u540e\u8fdb\u884c\u4e86\u6253\u5370\u3002\u8fd9\u6837\u7684\u65b9\u6cd5\u975e\u5e38\u76f4\u89c2\uff0c\u5e76\u4e14\u8bbf\u95ee\u901f\u5ea6\u4e5f\u975e\u5e38\u5feb\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528items()\u65b9\u6cd5\u904d\u5386\u5b57\u5178\u5143\u7d20<\/p>\n<\/p>\n<p><p><strong>items()\u65b9\u6cd5<\/strong>\u8fd4\u56de\u7684\u662f\u5b57\u5178\u4e2d\u6240\u6709\u952e\u503c\u5bf9\u7684\u89c6\u56fe\u5bf9\u8c61\uff0c\u53ef\u4ee5\u901a\u8fc7\u904d\u5386\u6765\u8f93\u51fa\u6240\u6709\u7684\u952e\u503c\u5bf9\u3002\u4e0b\u9762\u662f\u5177\u4f53\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u4e00\u4e2a\u5b57\u5178<\/p>\n<p>my_dict = {<\/p>\n<p>    &#39;name&#39;: &#39;Alice&#39;,<\/p>\n<p>    &#39;age&#39;: 25,<\/p>\n<p>    &#39;city&#39;: &#39;New York&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u4f7f\u7528items()\u65b9\u6cd5\u904d\u5386\u5b57\u5178\u5143\u7d20<\/strong><\/h2>\n<p>for key, value in my_dict.items():<\/p>\n<p>    print(f&quot;{key}: {value}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u901a\u8fc7items()\u65b9\u6cd5\u83b7\u53d6\u4e86\u5b57\u5178\u4e2d\u6240\u6709\u7684\u952e\u503c\u5bf9\uff0c\u5e76\u901a\u8fc7for\u5faa\u73af\u5bf9\u5176\u8fdb\u884c\u904d\u5386\uff0c\u6700\u7ec8\u8f93\u51fa\u4e86\u6bcf\u4e00\u4e2a\u952e\u503c\u5bf9\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528keys()\u65b9\u6cd5\u83b7\u53d6\u6240\u6709\u952e<\/p>\n<\/p>\n<p><p><strong>keys()\u65b9\u6cd5<\/strong>\u8fd4\u56de\u7684\u662f\u5b57\u5178\u4e2d\u6240\u6709key\u7684\u89c6\u56fe\u5bf9\u8c61\uff0c\u53ef\u4ee5\u901a\u8fc7\u904d\u5386\u6765\u8f93\u51fa\u6240\u6709\u7684key\u3002\u4e0b\u9762\u662f\u5177\u4f53\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u4e00\u4e2a\u5b57\u5178<\/p>\n<p>my_dict = {<\/p>\n<p>    &#39;name&#39;: &#39;Alice&#39;,<\/p>\n<p>    &#39;age&#39;: 25,<\/p>\n<p>    &#39;city&#39;: &#39;New York&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u4f7f\u7528keys()\u65b9\u6cd5\u83b7\u53d6\u6240\u6709\u952e<\/strong><\/h2>\n<p>for key in my_dict.keys():<\/p>\n<p>    print(key)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u901a\u8fc7keys()\u65b9\u6cd5\u83b7\u53d6\u4e86\u5b57\u5178\u4e2d\u6240\u6709\u7684\u952e\uff0c\u5e76\u901a\u8fc7for\u5faa\u73af\u5bf9\u5176\u8fdb\u884c\u904d\u5386\uff0c\u6700\u7ec8\u8f93\u51fa\u4e86\u6bcf\u4e00\u4e2a\u952e\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528values()\u65b9\u6cd5\u83b7\u53d6\u6240\u6709\u503c<\/p>\n<\/p>\n<p><p><strong>values()\u65b9\u6cd5<\/strong>\u8fd4\u56de\u7684\u662f\u5b57\u5178\u4e2d\u6240\u6709value\u7684\u89c6\u56fe\u5bf9\u8c61\uff0c\u53ef\u4ee5\u901a\u8fc7\u904d\u5386\u6765\u8f93\u51fa\u6240\u6709\u7684value\u3002\u4e0b\u9762\u662f\u5177\u4f53\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u4e00\u4e2a\u5b57\u5178<\/p>\n<p>my_dict = {<\/p>\n<p>    &#39;name&#39;: &#39;Alice&#39;,<\/p>\n<p>    &#39;age&#39;: 25,<\/p>\n<p>    &#39;city&#39;: &#39;New York&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u4f7f\u7528values()\u65b9\u6cd5\u83b7\u53d6\u6240\u6709\u503c<\/strong><\/h2>\n<p>for value in my_dict.values():<\/p>\n<p>    print(value)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u901a\u8fc7values()\u65b9\u6cd5\u83b7\u53d6\u4e86\u5b57\u5178\u4e2d\u6240\u6709\u7684\u503c\uff0c\u5e76\u901a\u8fc7for\u5faa\u73af\u5bf9\u5176\u8fdb\u884c\u904d\u5386\uff0c\u6700\u7ec8\u8f93\u51fa\u4e86\u6bcf\u4e00\u4e2a\u503c\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u5b57\u5178\u7684\u5176\u4ed6\u64cd\u4f5c<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u4e0a\u8ff0\u51e0\u79cd\u57fa\u672c\u64cd\u4f5c\uff0cPython\u5b57\u5178\u8fd8\u6709\u8bb8\u591a\u5176\u4ed6\u6709\u7528\u7684\u65b9\u6cd5\u548c\u64cd\u4f5c\uff0c\u4f8b\u5982\uff1aget()\u65b9\u6cd5\u3001update()\u65b9\u6cd5\u3001pop()\u65b9\u6cd5\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>get()\u65b9\u6cd5<\/strong><\/li>\n<\/ol>\n<p><p>get()\u65b9\u6cd5\u7528\u4e8e\u6839\u636ekey\u83b7\u53d6value\uff0c\u5f53key\u4e0d\u5b58\u5728\u65f6\u53ef\u4ee5\u8fd4\u56de\u4e00\u4e2a\u9ed8\u8ba4\u503c\uff0c\u800c\u4e0d\u662f\u629b\u51fa\u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u4e00\u4e2a\u5b57\u5178<\/p>\n<p>my_dict = {<\/p>\n<p>    &#39;name&#39;: &#39;Alice&#39;,<\/p>\n<p>    &#39;age&#39;: 25,<\/p>\n<p>    &#39;city&#39;: &#39;New York&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u4f7f\u7528get()\u65b9\u6cd5\u83b7\u53d6\u503c<\/strong><\/h2>\n<p>name = my_dict.get(&#39;name&#39;, &#39;Unknown&#39;)<\/p>\n<p>country = my_dict.get(&#39;country&#39;, &#39;Unknown&#39;)<\/p>\n<p>print(f&quot;Name: {name}, Country: {country}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528get()\u65b9\u6cd5\u83b7\u53d6\u4e86&#39;name&#39;\u7684\u503c\u5e76\u6253\u5370\u51fa\u6765\uff0c\u800c&#39;country&#39;\u8fd9\u4e2akey\u4e0d\u5b58\u5728\uff0c\u6240\u4ee5\u8fd4\u56de\u4e86\u9ed8\u8ba4\u503c&#39;Unknown&#39;\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>update()\u65b9\u6cd5<\/strong><\/li>\n<\/ol>\n<p><p>update()\u65b9\u6cd5\u7528\u4e8e\u5c06\u4e00\u4e2a\u5b57\u5178\u7684\u952e\u503c\u5bf9\u66f4\u65b0\u5230\u53e6\u4e00\u4e2a\u5b57\u5178\u4e2d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u4e24\u4e2a\u5b57\u5178<\/p>\n<p>dict1 = {<\/p>\n<p>    &#39;name&#39;: &#39;Alice&#39;,<\/p>\n<p>    &#39;age&#39;: 25<\/p>\n<p>}<\/p>\n<p>dict2 = {<\/p>\n<p>    &#39;age&#39;: 30,<\/p>\n<p>    &#39;city&#39;: &#39;New York&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u4f7f\u7528update()\u65b9\u6cd5\u66f4\u65b0\u5b57\u5178<\/strong><\/h2>\n<p>dict1.update(dict2)<\/p>\n<p>print(dict1)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528update()\u65b9\u6cd5\u5c06dict2\u7684\u952e\u503c\u5bf9\u66f4\u65b0\u5230\u4e86dict1\u4e2d\uff0c\u6700\u7ec8dict1\u5305\u542b\u4e86\u6240\u6709\u7684\u952e\u503c\u5bf9\uff0c\u5e76\u4e14&#39;dict1&#39;\u4e2d\u7684&#39;age&#39;\u88ab&#39;dict2&#39;\u4e2d\u7684&#39;age&#39;\u8986\u76d6\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>pop()\u65b9\u6cd5<\/strong><\/li>\n<\/ol>\n<p><p>pop()\u65b9\u6cd5\u7528\u4e8e\u6839\u636ekey\u79fb\u9664\u5b57\u5178\u4e2d\u7684\u4e00\u4e2a\u952e\u503c\u5bf9\uff0c\u5e76\u8fd4\u56de\u8fd9\u4e2a\u503c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u4e00\u4e2a\u5b57\u5178<\/p>\n<p>my_dict = {<\/p>\n<p>    &#39;name&#39;: &#39;Alice&#39;,<\/p>\n<p>    &#39;age&#39;: 25,<\/p>\n<p>    &#39;city&#39;: &#39;New York&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u4f7f\u7528pop()\u65b9\u6cd5\u79fb\u9664\u5143\u7d20<\/strong><\/h2>\n<p>age = my_dict.pop(&#39;age&#39;)<\/p>\n<p>print(f&quot;Removed Age: {age}&quot;)<\/p>\n<p>print(my_dict)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528pop()\u65b9\u6cd5\u79fb\u9664\u4e86\u5b57\u5178\u4e2d&#39;age&#39;\u8fd9\u4e2a\u952e\u503c\u5bf9\uff0c\u5e76\u6253\u5370\u4e86\u79fb\u9664\u7684\u503c\u548c\u79fb\u9664\u540e\u7684\u5b57\u5178\u3002<\/p>\n<\/p>\n<p><p>\u603b\u7ed3\u6765\u8bf4\uff0cPython\u4e2d\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u6253\u51fa\u5b57\u5178\u91cc\u7684\u5143\u7d20\uff0c\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u901a\u8fc7key\u76f4\u63a5\u8bbf\u95ee\u5b57\u5178\u5143\u7d20\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528items()\u65b9\u6cd5\u3001keys()\u65b9\u6cd5\u548cvalues()\u65b9\u6cd5\u6765\u904d\u5386\u5b57\u5178\u4e2d\u7684\u952e\u503c\u5bf9\u3001\u952e\u548c\u503c\u3002\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u66f4\u9ad8\u6548\u5730\u5904\u7406\u5b57\u5178\u6570\u636e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u6253\u5370\u5b57\u5178\u7684\u6240\u6709\u5143\u7d20\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528\u5faa\u73af\u904d\u5386\u5b57\u5178\u7684\u6bcf\u4e00\u4e2a\u952e\uff0c\u5229\u7528<code>items()<\/code>\u65b9\u6cd5\u540c\u65f6\u83b7\u53d6\u952e\u548c\u503c\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">my_dict = {&#39;name&#39;: &#39;Alice&#39;, &#39;age&#39;: 25, &#39;city&#39;: &#39;New York&#39;}\nfor key, value in my_dict.items():\n    print(f&quot;{key}: {value}&quot;)\n<\/code><\/pre>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5c06\u8f93\u51fa\u5b57\u5178\u4e2d\u6bcf\u4e2a\u952e\u53ca\u5176\u5bf9\u5e94\u7684\u503c\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u8bbf\u95ee\u5b57\u5178\u7684\u7279\u5b9a\u5143\u7d20\uff1f<\/strong><br \/>\u8bbf\u95ee\u5b57\u5178\u4e2d\u7684\u7279\u5b9a\u5143\u7d20\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u4f7f\u7528\u5bf9\u5e94\u7684\u952e\u5373\u53ef\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60f3\u83b7\u53d6<code>name<\/code>\u7684\u503c\uff0c\u53ef\u4ee5\u8fd9\u6837\u505a\uff1a  <\/p>\n<pre><code class=\"language-python\">print(my_dict[&#39;name&#39;])  # \u8f93\u51fa\uff1aAlice\n<\/code><\/pre>\n<p>\u6ce8\u610f\uff0c\u5982\u679c\u952e\u4e0d\u5b58\u5728\uff0c\u7a0b\u5e8f\u5c06\u629b\u51fa<code>KeyError<\/code>\u5f02\u5e38\u3002<\/p>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u4f7f\u7528\u5176\u4ed6\u65b9\u6cd5\u6765\u683c\u5f0f\u5316\u6253\u5370\u5b57\u5178\u7684\u5185\u5bb9\uff1f<\/strong><br \/>\u9664\u4e86\u4f7f\u7528\u5faa\u73af\uff0c\u8fd8\u6709\u5176\u4ed6\u65b9\u6cd5\u53ef\u4ee5\u683c\u5f0f\u5316\u6253\u5370\u5b57\u5178\u7684\u5185\u5bb9\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>json<\/code>\u6a21\u5757\u53ef\u4ee5\u5c06\u5b57\u5178\u4ee5\u7f8e\u89c2\u7684\u683c\u5f0f\u8f93\u51fa\uff1a  <\/p>\n<pre><code class=\"language-python\">import json\nprint(json.dumps(my_dict, indent=4))\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u80fd\u4f7f\u8f93\u51fa\u66f4\u5177\u53ef\u8bfb\u6027\uff0c\u7279\u522b\u662f\u5bf9\u4e8e\u5d4c\u5957\u5b57\u5178\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u6253\u51fa\u5b57\u5178\u91cc\u7684\u5143\u7d20\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\uff0c\u4f8b\u5982\uff0c\u4f7f\u7528key\u8bbf\u95ee\u3001\u4f7f\u7528items()\u65b9\u6cd5\u3001\u4f7f\u7528keys [&hellip;]","protected":false},"author":3,"featured_media":1061707,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1061695"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1061695"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1061695\/revisions"}],"predecessor-version":[{"id":1061708,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1061695\/revisions\/1061708"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1061707"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1061695"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1061695"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1061695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}