{"id":960923,"date":"2024-12-27T03:54:05","date_gmt":"2024-12-26T19:54:05","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/960923.html"},"modified":"2024-12-27T03:54:07","modified_gmt":"2024-12-26T19:54:07","slug":"python%e5%a6%82%e4%bd%95%e5%8e%bb%e6%8e%89%e5%88%97%e8%a1%a8%e6%9c%ab%e5%b0%be","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/960923.html","title":{"rendered":"python\u5982\u4f55\u53bb\u6389\u5217\u8868\u672b\u5c3e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25103305\/674ed831-1a40-412e-99d9-21a65bbbd77e.webp\" alt=\"python\u5982\u4f55\u53bb\u6389\u5217\u8868\u672b\u5c3e\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u53bb\u6389\u5217\u8868\u672b\u5c3e\u7684\u5143\u7d20\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\uff0c\u5982\uff1a\u4f7f\u7528<code>pop()<\/code>\u65b9\u6cd5\u3001\u4f7f\u7528\u5207\u7247\u3001\u4f7f\u7528<code>del<\/code>\u8bed\u53e5\u7b49\u3002\u6bcf\u79cd\u65b9\u6cd5\u5404\u6709\u7279\u70b9\uff0c\u53ef\u4ee5\u6839\u636e\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002<\/strong>\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u63d0\u4f9b\u4e00\u4e9b\u4f7f\u7528\u573a\u666f\u548c\u6ce8\u610f\u4e8b\u9879\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528<code>pop()<\/code>\u65b9\u6cd5<\/p>\n<\/p>\n<p><p><code>pop()<\/code>\u65b9\u6cd5\u7528\u4e8e\u79fb\u9664\u5217\u8868\u4e2d\u7684\u6700\u540e\u4e00\u4e2a\u5143\u7d20\uff0c\u5e76\u8fd4\u56de\u8be5\u5143\u7d20\u7684\u503c\u3002\u5982\u679c\u4e0d\u9700\u8981\u8fd4\u56de\u503c\uff0c\u53ea\u662f\u5355\u7eaf\u5730\u79fb\u9664\u5143\u7d20\uff0c\u8fd9\u79cd\u65b9\u6cd5\u4e5f\u5f88\u65b9\u4fbf\u3002<\/p>\n<\/p>\n<ol>\n<li><code>pop()<\/code>\u65b9\u6cd5\u7684\u4f7f\u7528<\/li>\n<\/ol>\n<p><p><code>pop()<\/code>\u65b9\u6cd5\u662fPython\u5217\u8868\u4e2d\u7684\u4e00\u4e2a\u5185\u7f6e\u65b9\u6cd5\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5b83\u4f1a\u5220\u9664\u5217\u8868\u7684\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u5e76\u8fd4\u56de\u8be5\u5143\u7d20\u7684\u503c\u3002\u4f7f\u7528\u8d77\u6765\u975e\u5e38\u7b80\u5355\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4, 5]<\/p>\n<p>last_element = my_list.pop()<\/p>\n<p>print(my_list)  # \u8f93\u51fa\uff1a[1, 2, 3, 4]<\/p>\n<p>print(last_element)  # \u8f93\u51fa\uff1a5<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>pop()<\/code>\u65b9\u6cd5\u5220\u9664\u4e86\u5217\u8868\u7684\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u5e76\u8fd4\u56de\u4e86\u5b83\u3002\u6ce8\u610f\uff0c<code>pop()<\/code>\u65b9\u6cd5\u4f1a\u4fee\u6539\u539f\u5217\u8868\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><code>pop()<\/code>\u65b9\u6cd5\u7684\u4f18\u7f3a\u70b9<\/li>\n<\/ol>\n<p><p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u7b80\u5355\u6613\u7528<\/strong>\uff1a\u53ea\u9700\u4e00\u884c\u4ee3\u7801\u5373\u53ef\u5b9e\u73b0\u5220\u9664\u64cd\u4f5c\u3002<\/li>\n<li><strong>\u8fd4\u56de\u503c<\/strong>\uff1a\u53ef\u4ee5\u76f4\u63a5\u83b7\u53d6\u88ab\u5220\u9664\u7684\u5143\u7d20\u503c\u3002<\/li>\n<\/ul>\n<p><p><strong>\u7f3a\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u4f1a\u4fee\u6539\u539f\u5217\u8868<\/strong>\uff1a\u5982\u679c\u4e0d\u60f3\u4fee\u6539\u539f\u5217\u8868\uff0c\u9700\u8981\u5148\u590d\u5236\u5217\u8868\u3002<\/li>\n<li><strong>\u65f6\u95f4\u590d\u6742\u5ea6<\/strong>\uff1a\u5bf9\u4e8e\u5217\u8868\u6765\u8bf4\uff0c<code>pop()<\/code>\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO(1)\uff0c\u975e\u5e38\u9ad8\u6548\u3002<\/li>\n<\/ul>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u5207\u7247<\/p>\n<\/p>\n<p><p>\u5207\u7247\u662fPython\u4e2d\u7528\u4e8e\u622a\u53d6\u90e8\u5206\u5e8f\u5217\u7684\u5f3a\u5927\u5de5\u5177\uff0c\u901a\u8fc7\u5207\u7247\u53ef\u4ee5\u7075\u6d3b\u5730\u83b7\u53d6\u5217\u8868\u7684\u4efb\u610f\u90e8\u5206\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5207\u7247\u65b9\u6cd5\u7684\u4f7f\u7528<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u5207\u7247\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u53bb\u6389\u5217\u8868\u7684\u6700\u540e\u4e00\u4e2a\u5143\u7d20\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4, 5]<\/p>\n<p>new_list = my_list[:-1]<\/p>\n<p>print(new_list)  # \u8f93\u51fa\uff1a[1, 2, 3, 4]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>my_list[:-1]<\/code>\u8868\u793a\u83b7\u53d6\u4ece\u5217\u8868\u7b2c\u4e00\u4e2a\u5143\u7d20\u5230\u5012\u6570\u7b2c\u4e8c\u4e2a\u5143\u7d20\u7684\u5b50\u5217\u8868\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u5207\u7247\u65b9\u6cd5\u7684\u4f18\u7f3a\u70b9<\/li>\n<\/ol>\n<p><p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u4e0d\u4fee\u6539\u539f\u5217\u8868<\/strong>\uff1a\u5207\u7247\u64cd\u4f5c\u8fd4\u56de\u65b0\u5217\u8868\uff0c\u4e0d\u6539\u53d8\u539f\u5217\u8868\u5185\u5bb9\u3002<\/li>\n<li><strong>\u7075\u6d3b\u6027\u9ad8<\/strong>\uff1a\u53ef\u4ee5\u6839\u636e\u9700\u8981\u83b7\u53d6\u5217\u8868\u7684\u4efb\u610f\u90e8\u5206\u3002<\/li>\n<\/ul>\n<p><p><strong>\u7f3a\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u65f6\u95f4\u590d\u6742\u5ea6<\/strong>\uff1a\u5207\u7247\u64cd\u4f5c\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u5217\u8868\uff0c\u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO(n)\u3002<\/li>\n<li><strong>\u5185\u5b58\u5360\u7528<\/strong>\uff1a\u751f\u6210\u65b0\u5217\u8868\u9700\u8981\u989d\u5916\u7684\u5185\u5b58\u7a7a\u95f4\u3002<\/li>\n<\/ul>\n<p><p>\u4e09\u3001\u4f7f\u7528<code>del<\/code>\u8bed\u53e5<\/p>\n<\/p>\n<p><p><code>del<\/code>\u8bed\u53e5\u7528\u4e8e\u5220\u9664\u5bf9\u8c61\uff0c\u5220\u9664\u5217\u8868\u4e2d\u7684\u5143\u7d20\u65f6\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528<code>del<\/code>\u8bed\u53e5\u3002<\/p>\n<\/p>\n<ol>\n<li><code>del<\/code>\u8bed\u53e5\u7684\u4f7f\u7528<\/li>\n<\/ol>\n<p><p>\u4f7f\u7528<code>del<\/code>\u8bed\u53e5\u53ef\u4ee5\u76f4\u63a5\u5220\u9664\u5217\u8868\u7684\u6700\u540e\u4e00\u4e2a\u5143\u7d20\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4, 5]<\/p>\n<p>del my_list[-1]<\/p>\n<p>print(my_list)  # \u8f93\u51fa\uff1a[1, 2, 3, 4]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><code>del<\/code>\u8bed\u53e5\u7684\u4f18\u7f3a\u70b9<\/li>\n<\/ol>\n<p><p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u76f4\u63a5\u4fee\u6539\u5217\u8868<\/strong>\uff1a<code>del<\/code>\u8bed\u53e5\u76f4\u63a5\u4fee\u6539\u539f\u5217\u8868\uff0c\u4e0d\u9700\u8981\u521b\u5efa\u65b0\u5217\u8868\u3002<\/li>\n<li><strong>\u7b80\u5355\u76f4\u63a5<\/strong>\uff1a\u5bf9\u4e8e\u5220\u9664\u64cd\u4f5c\uff0c<code>del<\/code>\u8bed\u53e5\u975e\u5e38\u76f4\u89c2\u3002<\/li>\n<\/ul>\n<p><p><strong>\u7f3a\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u65e0\u8fd4\u56de\u503c<\/strong>\uff1a<code>del<\/code>\u8bed\u53e5\u4e0d\u4f1a\u8fd4\u56de\u88ab\u5220\u9664\u7684\u5143\u7d20\u3002<\/li>\n<li><strong>\u9700\u8981\u5c0f\u5fc3\u4f7f\u7528<\/strong>\uff1a\u4e0d\u5f53\u4f7f\u7528\u53ef\u80fd\u5f15\u53d1\u5f02\u5e38\uff0c\u6bd4\u5982\u5220\u9664\u4e0d\u5b58\u5728\u7684\u7d22\u5f15\u3002<\/li>\n<\/ul>\n<p><p>\u56db\u3001\u4f7f\u7528<code>list comprehension<\/code><\/p>\n<\/p>\n<p><p>\u5217\u8868\u63a8\u5bfc\u5f0f\u5728Python\u4e2d\u975e\u5e38\u5f3a\u5927\uff0c\u53ef\u4ee5\u7528\u6765\u751f\u6210\u65b0\u7684\u5217\u8868\u3002\u5728\u5220\u9664\u5217\u8868\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u7684\u573a\u666f\u4e2d\uff0c\u5217\u8868\u63a8\u5bfc\u5f0f\u5e76\u4e0d\u662f\u6700\u4f18\u9009\u62e9\uff0c\u4f46\u4e5f\u53ef\u4ee5\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4, 5]<\/p>\n<p>new_list = [my_list[i] for i in range(len(my_list)-1)]<\/p>\n<p>print(new_list)  # \u8f93\u51fa\uff1a[1, 2, 3, 4]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u5217\u8868\u63a8\u5bfc\u5f0f\u7684\u4f18\u7f3a\u70b9<\/li>\n<\/ol>\n<p><p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u7075\u6d3b<\/strong>\uff1a\u53ef\u4ee5\u5728\u751f\u6210\u65b0\u5217\u8868\u65f6\u52a0\u5165\u6761\u4ef6\u3002<\/li>\n<li><strong>\u8868\u8fbe\u6027\u5f3a<\/strong>\uff1a\u4ee3\u7801\u7b80\u6d01\u660e\u4e86\u3002<\/li>\n<\/ul>\n<p><p><strong>\u7f3a\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u6548\u7387\u4f4e<\/strong>\uff1a\u4e0e\u5207\u7247\u76f8\u4f3c\uff0c\u9700\u8981\u904d\u5386\u5217\u8868\uff0c\u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO(n)\u3002<\/li>\n<li><strong>\u5185\u5b58\u5360\u7528<\/strong>\uff1a\u65b0\u5217\u8868\u5360\u7528\u989d\u5916\u5185\u5b58\u3002<\/li>\n<\/ul>\n<p><p>\u4e94\u3001\u4f7f\u7528<code>filter()<\/code>\u51fd\u6570<\/p>\n<\/p>\n<p><p><code>filter()<\/code>\u51fd\u6570\u7528\u4e8e\u8fc7\u6ee4\u5e8f\u5217\u3002\u867d\u7136\u4e0d\u5e38\u89c1\uff0c\u4f46\u53ef\u4ee5\u7528\u4e8e\u5220\u9664\u5217\u8868\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528<code>filter()<\/code>\u51fd\u6570<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">my_list = [1, 2, 3, 4, 5]<\/p>\n<p>new_list = list(filter(lambda x: x != my_list[-1], my_list))<\/p>\n<p>print(new_list)  # \u8f93\u51fa\uff1a[1, 2, 3, 4]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><code>filter()<\/code>\u51fd\u6570\u7684\u4f18\u7f3a\u70b9<\/li>\n<\/ol>\n<p><p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u9002\u7528\u8303\u56f4\u5e7f<\/strong>\uff1a\u53ef\u4ee5\u7528\u4e8e\u66f4\u590d\u6742\u7684\u8fc7\u6ee4\u6761\u4ef6\u3002<\/li>\n<li><strong>\u4ee3\u7801\u53ef\u8bfb\u6027<\/strong>\uff1a\u5bf9\u4e8e\u7279\u5b9a\u8fc7\u6ee4\u6761\u4ef6\uff0c\u4ee3\u7801\u8f83\u6613\u7406\u89e3\u3002<\/li>\n<\/ul>\n<p><p><strong>\u7f3a\u70b9\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>\u6548\u7387\u4f4e<\/strong>\uff1a\u9700\u8981\u904d\u5386\u6574\u4e2a\u5217\u8868\uff0c\u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO(n)\u3002<\/li>\n<li><strong>\u4e0d\u5fc5\u8981\u7684\u590d\u6742\u6027<\/strong>\uff1a\u5bf9\u4e8e\u7b80\u5355\u7684\u5220\u9664\u64cd\u4f5c\uff0c<code>filter()<\/code>\u663e\u5f97\u591a\u4f59\u3002<\/li>\n<\/ul>\n<p><p>\u516d\u3001\u603b\u7ed3\u4e0e\u5efa\u8bae<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u53bb\u6389\u5217\u8868\u7684\u6700\u540e\u4e00\u4e2a\u5143\u7d20\uff0c\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u9002\u7528\u573a\u666f\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5982\u679c\u9700\u8981\u5220\u9664\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u5e76\u83b7\u53d6\u5176\u503c\uff0c<strong><code>pop()<\/code>\u65b9\u6cd5<\/strong>\u662f\u6700\u4f73\u9009\u62e9\u3002<\/li>\n<li>\u5982\u679c\u9700\u8981\u4fdd\u7559\u539f\u5217\u8868\u4e0d\u53d8\uff0c\u4f7f\u7528<strong>\u5207\u7247<\/strong>\u64cd\u4f5c\u3002<\/li>\n<li>\u5982\u679c\u9700\u8981\u76f4\u63a5\u4fee\u6539\u5217\u8868\u4e14\u4e0d\u9700\u8981\u8fd4\u56de\u503c\uff0c\u4f7f\u7528<strong><code>del<\/code>\u8bed\u53e5<\/strong>\u3002<\/li>\n<li><strong>\u5217\u8868\u63a8\u5bfc\u5f0f<\/strong>\u548c<strong><code>filter()<\/code>\u51fd\u6570<\/strong>\u5728\u7279\u5b9a\u573a\u666f\u4e0b\u4e5f\u53ef\u4ee5\u4f7f\u7528\uff0c\u4f46\u901a\u5e38\u4e0d\u662f\u6700\u4f18\u9009\u62e9\u3002<\/li>\n<\/ul>\n<p><p>\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u6548\u7387\u3002\u6839\u636e\u5b9e\u9645\u9700\u6c42\uff0c\u7075\u6d3b\u8fd0\u7528\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5c06\u4f7f\u4f60\u7684\u4ee3\u7801\u66f4\u52a0\u4f18\u96c5\u548c\u9ad8\u6548\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5220\u9664\u5217\u8868\u7684\u6700\u540e\u4e00\u4e2a\u5143\u7d20\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>pop()<\/code>\u65b9\u6cd5\u6765\u5220\u9664\u5217\u8868\u7684\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u3002\u8fd9\u79cd\u65b9\u6cd5\u4f1a\u8fd4\u56de\u88ab\u5220\u9664\u7684\u5143\u7d20\u3002\u4f8b\u5982\uff0c\u5982\u679c\u6709\u4e00\u4e2a\u5217\u8868<code>my_list = [1, 2, 3, 4]<\/code>\uff0c\u4f7f\u7528<code>my_list.pop()<\/code>\u540e\uff0c\u5217\u8868\u5c06\u53d8\u4e3a<code>[1, 2, 3]<\/code>\uff0c\u800c<code>pop()<\/code>\u8fd4\u56de\u7684\u503c\u4e3a<code>4<\/code>\u3002<\/p>\n<p><strong>\u662f\u5426\u6709\u5176\u4ed6\u65b9\u6cd5\u53ef\u4ee5\u5220\u9664\u5217\u8868\u672b\u5c3e\u7684\u5143\u7d20\uff1f<\/strong><br \/>\u9664\u4e86\u4f7f\u7528<code>pop()<\/code>\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u5207\u7247\u6765\u5220\u9664\u5217\u8868\u7684\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u3002\u4f8b\u5982\uff0c<code>my_list = my_list[:-1]<\/code>\u5c06\u521b\u5efa\u4e00\u4e2a\u65b0\u5217\u8868\uff0c\u5305\u542b\u539f\u5217\u8868\u4e2d\u9664\u4e86\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u7684\u6240\u6709\u5143\u7d20\u3002\u8fd9\u6837\u53ef\u4ee5\u5b9e\u73b0\u4e0d\u4fee\u6539\u539f\u5217\u8868\u800c\u662f\u521b\u5efa\u4e00\u4e2a\u65b0\u5217\u8868\u3002<\/p>\n<p><strong>\u5220\u9664\u591a\u4e2a\u5143\u7d20\u65f6\u8be5\u5982\u4f55\u5904\u7406\uff1f<\/strong><br \/>\u5982\u679c\u9700\u8981\u540c\u65f6\u5220\u9664\u5217\u8868\u672b\u5c3e\u7684\u591a\u4e2a\u5143\u7d20\uff0c\u53ef\u4ee5\u4f7f\u7528\u5207\u7247\u3002\u4f8b\u5982\uff0c<code>my_list = my_list[:-n]<\/code>\uff0c\u5176\u4e2d<code>n<\/code>\u662f\u8981\u5220\u9664\u7684\u5143\u7d20\u6570\u91cf\u3002\u8fd9\u5c06\u8fd4\u56de\u4e00\u4e2a\u4e0d\u5305\u542b\u6700\u540e<code>n<\/code>\u4e2a\u5143\u7d20\u7684\u65b0\u5217\u8868\uff0c\u9002\u7528\u4e8e\u9700\u8981\u5904\u7406\u66f4\u590d\u6742\u7684\u5217\u8868\u5185\u5bb9\u60c5\u51b5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u53bb\u6389\u5217\u8868\u672b\u5c3e\u7684\u5143\u7d20\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\uff0c\u5982\uff1a\u4f7f\u7528pop()\u65b9\u6cd5\u3001\u4f7f\u7528\u5207\u7247\u3001\u4f7f\u7528del\u8bed\u53e5\u7b49\u3002\u6bcf\u79cd [&hellip;]","protected":false},"author":3,"featured_media":960928,"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\/960923"}],"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=960923"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/960923\/revisions"}],"predecessor-version":[{"id":960932,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/960923\/revisions\/960932"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/960928"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=960923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=960923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=960923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}