{"id":1081442,"date":"2025-01-08T12:39:37","date_gmt":"2025-01-08T04:39:37","guid":{"rendered":""},"modified":"2025-01-08T12:39:45","modified_gmt":"2025-01-08T04:39:45","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8python%e4%b8%ad%e7%94%a8%e5%be%aa%e7%8e%af%e6%94%b9%e5%8f%98%e5%88%97%e8%a1%a8%e5%90%8d%e7%a7%b0-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1081442.html","title":{"rendered":"\u5982\u4f55\u5728Python\u4e2d\u7528\u5faa\u73af\u6539\u53d8\u5217\u8868\u540d\u79f0"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24183452\/db76c8ab-0e1e-4836-af87-d2743f18e493.webp\" alt=\"\u5982\u4f55\u5728Python\u4e2d\u7528\u5faa\u73af\u6539\u53d8\u5217\u8868\u540d\u79f0\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528\u5faa\u73af\u6539\u53d8\u5217\u8868\u540d\u79f0\u5728Python\u7f16\u7a0b\u4e2d\u662f\u4e00\u9879\u9ad8\u7ea7\u6280\u5de7\uff0c\u6d89\u53ca\u5230\u52a8\u6001\u751f\u6210\u548c\u64cd\u4f5c\u53d8\u91cf\u540d\u3002<\/strong> \u5728Python\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u6765\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\uff0c\u5305\u62ec\u4f7f\u7528\u5b57\u5178\u3001\u5217\u8868\u3001exec\u51fd\u6570\u7b49\u3002\u7136\u800c\uff0c\u76f4\u63a5\u64cd\u4f5c\u53d8\u91cf\u540d\u5e76\u4e0d\u662f\u63a8\u8350\u7684\u505a\u6cd5\uff0c\u56e0\u4e3a\u5b83\u4f1a\u4f7f\u4ee3\u7801\u53d8\u5f97\u96be\u4ee5\u7ef4\u62a4\u548c\u8c03\u8bd5\u3002\u4e00\u4e2a\u66f4\u597d\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u6570\u636e\u7ed3\u6784\u5982\u5b57\u5178\u6216\u5217\u8868\u6765\u7ba1\u7406\u591a\u4e2a\u5217\u8868\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u51e0\u79cd\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\u7684\u65b9\u6cd5\uff0c\u5e76\u8be6\u7ec6\u89e3\u91ca\u5176\u4e2d\u4e00\u79cd\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u5b57\u5178\u6765\u52a8\u6001\u7ba1\u7406\u5217\u8868<\/h3>\n<\/p>\n<p><p>\u5b57\u5178\u662f\u4e00\u79cd\u975e\u5e38\u7075\u6d3b\u7684\u6570\u636e\u7ed3\u6784\uff0c\u53ef\u4ee5\u7528\u6765\u5b58\u50a8\u548c\u7ba1\u7406\u591a\u4e2a\u5217\u8868\u3002\u901a\u8fc7\u4f7f\u7528\u5b57\u5178\uff0c\u6211\u4eec\u53ef\u4ee5\u52a8\u6001\u5730\u521b\u5efa\u548c\u4fee\u6539\u5217\u8868\uff0c\u800c\u65e0\u9700\u76f4\u63a5\u64cd\u4f5c\u53d8\u91cf\u540d\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5b57\u5178\u7684\u57fa\u672c\u7528\u6cd5<\/h4>\n<\/p>\n<p><p>\u5b57\u5178\u662f\u4e00\u79cd\u952e\u503c\u5bf9\u7684\u6570\u636e\u7ed3\u6784\uff0c\u5141\u8bb8\u6211\u4eec\u901a\u8fc7\u952e\u6765\u8bbf\u95ee\u548c\u4fee\u6539\u503c\u3002\u5728Python\u4e2d\uff0c\u5b57\u5178\u53ef\u4ee5\u901a\u8fc7\u82b1\u62ec\u53f7<code>{}<\/code>\u6765\u521b\u5efa\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u4e00\u4e2a\u7a7a\u5b57\u5178<\/p>\n<p>my_dict = {}<\/p>\n<h2><strong>\u6dfb\u52a0\u5217\u8868\u5230\u5b57\u5178\u4e2d<\/strong><\/h2>\n<p>my_dict[&#39;list1&#39;] = [1, 2, 3]<\/p>\n<p>my_dict[&#39;list2&#39;] = [4, 5, 6]<\/p>\n<h2><strong>\u8bbf\u95ee\u5b57\u5178\u4e2d\u7684\u5217\u8868<\/strong><\/h2>\n<p>print(my_dict[&#39;list1&#39;])  # \u8f93\u51fa: [1, 2, 3]<\/p>\n<p>print(my_dict[&#39;list2&#39;])  # \u8f93\u51fa: [4, 5, 6]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528\u5faa\u73af\u52a8\u6001\u521b\u5efa\u5217\u8868<\/h4>\n<\/p>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5faa\u73af\u6765\u52a8\u6001\u5730\u521b\u5efa\u548c\u547d\u540d\u5217\u8868\uff0c\u5e76\u5c06\u5b83\u4eec\u5b58\u50a8\u5728\u5b57\u5178\u4e2d\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u4e00\u4e2a\u7a7a\u5b57\u5178<\/p>\n<p>my_dict = {}<\/p>\n<h2><strong>\u4f7f\u7528\u5faa\u73af\u52a8\u6001\u521b\u5efa\u5217\u8868\u5e76\u6dfb\u52a0\u5230\u5b57\u5178\u4e2d<\/strong><\/h2>\n<p>for i in range(5):<\/p>\n<p>    list_name = f&#39;list{i+1}&#39;  # \u52a8\u6001\u751f\u6210\u5217\u8868\u540d\u79f0<\/p>\n<p>    my_dict[list_name] = [i * j for j in range(1, 4)]  # \u52a8\u6001\u521b\u5efa\u5217\u8868\u5e76\u8d4b\u503c<\/p>\n<h2><strong>\u6253\u5370\u5b57\u5178\u4e2d\u7684\u6240\u6709\u5217\u8868<\/strong><\/h2>\n<p>for key, value in my_dict.items():<\/p>\n<p>    print(f&#39;{key}: {value}&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u683c\u5f0f\u5316\u5b57\u7b26\u4e32<code>f&#39;list{i+1}&#39;<\/code>\u6765\u52a8\u6001\u751f\u6210\u5217\u8868\u540d\u79f0\uff0c\u5e76\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u6765\u751f\u6210\u5217\u8868\u7684\u503c\u3002\u6700\u7ec8\uff0c\u6211\u4eec\u5c06\u6240\u6709\u751f\u6210\u7684\u5217\u8868\u5b58\u50a8\u5728\u5b57\u5178<code>my_dict<\/code>\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u5217\u8868\u7ba1\u7406\u591a\u4e2a\u5217\u8868<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u5b57\u5178\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528\u5217\u8868\u6765\u7ba1\u7406\u591a\u4e2a\u5217\u8868\u3002\u867d\u7136\u5217\u8868\u4e0d\u5141\u8bb8\u6211\u4eec\u901a\u8fc7\u540d\u79f0\u6765\u8bbf\u95ee\u5143\u7d20\uff0c\u4f46\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u7d22\u5f15\u6765\u8bbf\u95ee\u548c\u4fee\u6539\u5217\u8868\u4e2d\u7684\u5143\u7d20\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5217\u8868\u7684\u57fa\u672c\u7528\u6cd5<\/h4>\n<\/p>\n<p><p>\u5217\u8868\u662f\u4e00\u79cd\u6709\u5e8f\u7684\u96c6\u5408\uff0c\u5141\u8bb8\u6211\u4eec\u5b58\u50a8\u548c\u64cd\u4f5c\u591a\u4e2a\u5143\u7d20\u3002\u5728Python\u4e2d\uff0c\u5217\u8868\u53ef\u4ee5\u901a\u8fc7\u65b9\u62ec\u53f7<code>[]<\/code>\u6765\u521b\u5efa\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u4e00\u4e2a\u5305\u542b\u591a\u4e2a\u5217\u8868\u7684\u5217\u8868<\/p>\n<p>list_of_lists = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]<\/p>\n<h2><strong>\u8bbf\u95ee\u5217\u8868\u4e2d\u7684\u5217\u8868<\/strong><\/h2>\n<p>print(list_of_lists[0])  # \u8f93\u51fa: [1, 2, 3]<\/p>\n<p>print(list_of_lists[1])  # \u8f93\u51fa: [4, 5, 6]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528\u5faa\u73af\u52a8\u6001\u521b\u5efa\u5217\u8868<\/h4>\n<\/p>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5faa\u73af\u6765\u52a8\u6001\u5730\u521b\u5efa\u548c\u7ba1\u7406\u591a\u4e2a\u5217\u8868\uff0c\u5e76\u5c06\u5b83\u4eec\u5b58\u50a8\u5728\u4e00\u4e2a\u5217\u8868\u4e2d\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u4e00\u4e2a\u7a7a\u5217\u8868<\/p>\n<p>list_of_lists = []<\/p>\n<h2><strong>\u4f7f\u7528\u5faa\u73af\u52a8\u6001\u521b\u5efa\u5217\u8868\u5e76\u6dfb\u52a0\u5230\u5217\u8868\u4e2d<\/strong><\/h2>\n<p>for i in range(5):<\/p>\n<p>    new_list = [i * j for j in range(1, 4)]  # \u52a8\u6001\u521b\u5efa\u5217\u8868\u5e76\u8d4b\u503c<\/p>\n<p>    list_of_lists.append(new_list)  # \u5c06\u65b0\u5217\u8868\u6dfb\u52a0\u5230\u5217\u8868\u4e2d<\/p>\n<h2><strong>\u6253\u5370\u5217\u8868\u4e2d\u7684\u6240\u6709\u5217\u8868<\/strong><\/h2>\n<p>for index, value in enumerate(list_of_lists):<\/p>\n<p>    print(f&#39;List {index+1}: {value}&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u6765\u52a8\u6001\u751f\u6210\u5217\u8868\u7684\u503c\uff0c\u5e76\u4f7f\u7528<code>append()<\/code>\u65b9\u6cd5\u5c06\u65b0\u521b\u5efa\u7684\u5217\u8868\u6dfb\u52a0\u5230<code>list_of_lists<\/code>\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528exec\u51fd\u6570\u52a8\u6001\u521b\u5efa\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u5c3d\u7ba1\u4e0d\u63a8\u8350\uff0c\u4f46\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>exec()<\/code>\u51fd\u6570\u6765\u52a8\u6001\u521b\u5efa\u53d8\u91cf\u3002<code>exec()<\/code>\u51fd\u6570\u5141\u8bb8\u6211\u4eec\u6267\u884c\u7531\u5b57\u7b26\u4e32\u8868\u793a\u7684Python\u4ee3\u7801\uff0c\u4ece\u800c\u5b9e\u73b0\u52a8\u6001\u521b\u5efa\u53d8\u91cf\u7684\u76ee\u7684\u3002<\/p>\n<\/p>\n<p><h4>1\u3001exec\u51fd\u6570\u7684\u57fa\u672c\u7528\u6cd5<\/h4>\n<\/p>\n<p><p><code>exec()<\/code>\u51fd\u6570\u53ef\u4ee5\u6267\u884c\u7531\u5b57\u7b26\u4e32\u8868\u793a\u7684Python\u4ee3\u7801\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u52a8\u6001\u521b\u5efa\u53d8\u91cf<\/p>\n<p>exec(&quot;my_list = [1, 2, 3]&quot;)<\/p>\n<h2><strong>\u8bbf\u95ee\u52a8\u6001\u521b\u5efa\u7684\u53d8\u91cf<\/strong><\/h2>\n<p>print(my_list)  # \u8f93\u51fa: [1, 2, 3]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528\u5faa\u73af\u52a8\u6001\u521b\u5efa\u53d8\u91cf<\/h4>\n<\/p>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5faa\u73af\u548c<code>exec()<\/code>\u51fd\u6570\u6765\u52a8\u6001\u521b\u5efa\u591a\u4e2a\u53d8\u91cf\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4f7f\u7528\u5faa\u73af\u52a8\u6001\u521b\u5efa\u53d8\u91cf<\/p>\n<p>for i in range(5):<\/p>\n<p>    exec(f&#39;list{i+1} = [i * j for j in range(1, 4)]&#39;)<\/p>\n<h2><strong>\u8bbf\u95ee\u52a8\u6001\u521b\u5efa\u7684\u53d8\u91cf<\/strong><\/h2>\n<p>print(list1)  # \u8f93\u51fa: [0, 0, 0]<\/p>\n<p>print(list2)  # \u8f93\u51fa: [0, 1, 2]<\/p>\n<p>print(list3)  # \u8f93\u51fa: [0, 2, 4]<\/p>\n<p>print(list4)  # \u8f93\u51fa: [0, 3, 6]<\/p>\n<p>print(list5)  # \u8f93\u51fa: [0, 4, 8]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u683c\u5f0f\u5316\u5b57\u7b26\u4e32<code>f&#39;list{i+1} = [i * j for j in range(1, 4)]&#39;<\/code>\u6765\u52a8\u6001\u751f\u6210Python\u4ee3\u7801\uff0c\u5e76\u4f7f\u7528<code>exec()<\/code>\u51fd\u6570\u6267\u884c\u8fd9\u4e9b\u4ee3\u7801\uff0c\u4ece\u800c\u52a8\u6001\u521b\u5efa\u53d8\u91cf\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u52a8\u6001\u7ba1\u7406\u591a\u4e2a\u5217\u8868\u7684\u6700\u4f73\u5b9e\u8df5\u662f\u4f7f\u7528\u5b57\u5178\u6216\u5217\u8868\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u64cd\u4f5c\u53d8\u91cf\u540d\u3002\u5b57\u5178\u5141\u8bb8\u6211\u4eec\u901a\u8fc7\u952e\u6765\u8bbf\u95ee\u548c\u4fee\u6539\u5217\u8868\uff0c\u975e\u5e38\u9002\u5408\u52a8\u6001\u521b\u5efa\u548c\u7ba1\u7406\u591a\u4e2a\u5217\u8868\u3002\u5217\u8868\u5219\u5141\u8bb8\u6211\u4eec\u901a\u8fc7\u7d22\u5f15\u6765\u8bbf\u95ee\u548c\u4fee\u6539\u5217\u8868\uff0c\u9002\u7528\u4e8e\u9700\u8981\u6709\u5e8f\u5b58\u50a8\u591a\u4e2a\u5217\u8868\u7684\u573a\u666f\u3002\u5c3d\u7ba1<code>exec()<\/code>\u51fd\u6570\u53ef\u4ee5\u5b9e\u73b0\u52a8\u6001\u521b\u5efa\u53d8\u91cf\uff0c\u4f46\u4e0d\u63a8\u8350\u4f7f\u7528\uff0c\u56e0\u4e3a\u5b83\u4f1a\u4f7f\u4ee3\u7801\u96be\u4ee5\u7ef4\u62a4\u548c\u8c03\u8bd5\u3002\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\uff0c\u6211\u4eec\u5e94\u5c3d\u91cf\u4f7f\u7528\u5b57\u5178\u6216\u5217\u8868\u6765\u5b9e\u73b0\u52a8\u6001\u7ba1\u7406\u591a\u4e2a\u5217\u8868\u7684\u529f\u80fd\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4f7f\u7528\u5faa\u73af\u52a8\u6001\u521b\u5efa\u591a\u4e2a\u5217\u8868\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u52a8\u6001\u521b\u5efa\u591a\u4e2a\u5217\u8868\u7684\u5e38\u89c1\u65b9\u6cd5\u662f\u4f7f\u7528\u5b57\u5178\u6216\u5217\u8868\u7684\u5d4c\u5957\u7ed3\u6784\u3002\u901a\u8fc7\u5faa\u73af\uff0c\u53ef\u4ee5\u751f\u6210\u4e00\u7cfb\u5217\u540d\u79f0\u5bf9\u5e94\u7684\u5217\u8868\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b57\u5178\u6765\u5b58\u50a8\u5217\u8868\uff0c\u5176\u4e2d\u952e\u662f\u52a8\u6001\u751f\u6210\u7684\u540d\u79f0\uff0c\u503c\u662f\u76f8\u5e94\u7684\u5217\u8868\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a  <\/p>\n<pre><code class=\"language-python\">list_dict = {}\nfor i in range(5):\n    list_dict[f&#39;list_{i}&#39;] = []\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c\u4f60\u5c31\u521b\u5efa\u4e86\u5305\u542b\u4e94\u4e2a\u7a7a\u5217\u8868\u7684\u5b57\u5178\uff0c\u540d\u79f0\u4e3a<code>list_0<\/code>\u5230<code>list_4<\/code>\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u5faa\u73af\u4e2d\u4fee\u6539\u5217\u8868\u7684\u5185\u5bb9\u800c\u4e0d\u662f\u540d\u79f0\uff1f<\/strong><br \/>\u5728\u5faa\u73af\u4e2d\u4fee\u6539\u5217\u8868\u5185\u5bb9\u7684\u65b9\u6cd5\u975e\u5e38\u7b80\u5355\u3002\u4f60\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528<code>append()<\/code>\u3001<code>extend()<\/code>\u6216\u5176\u4ed6\u5217\u8868\u65b9\u6cd5\u6765\u6dfb\u52a0\u5143\u7d20\u3002\u4f8b\u5982\uff0c\u4ee5\u4e0b\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u5728\u5faa\u73af\u4e2d\u5411\u540c\u4e00\u4e2a\u5217\u8868\u6dfb\u52a0\u5143\u7d20\uff1a  <\/p>\n<pre><code class=\"language-python\">my_list = []\nfor i in range(5):\n    my_list.append(i)\n<\/code><\/pre>\n<p>\u6267\u884c\u5b8c\u6bd5\u540e\uff0c<code>my_list<\/code>\u5c06\u5305\u542b<code>[0, 1, 2, 3, 4]<\/code>\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u5faa\u73af\u4e2d\u4f7f\u7528\u5217\u8868\u7684\u7d22\u5f15\u6765\u8bbf\u95ee\u548c\u4fee\u6539\u5143\u7d20\uff1f<\/strong><br \/>\u5229\u7528\u7d22\u5f15\u5728\u5faa\u73af\u4e2d\u8bbf\u95ee\u548c\u4fee\u6539\u5217\u8868\u7684\u5143\u7d20\u662f\u975e\u5e38\u6709\u6548\u7684\u3002\u53ef\u4ee5\u4f7f\u7528<code>range()<\/code>\u51fd\u6570\u751f\u6210\u7d22\u5f15\uff0c\u8fdb\u800c\u64cd\u4f5c\u5217\u8868\u4e2d\u7684\u7279\u5b9a\u5143\u7d20\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">my_list = [0, 1, 2, 3, 4]\nfor i in range(len(my_list)):\n    my_list[i] *= 2\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c<code>my_list<\/code>\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u90fd\u5c06\u88ab\u4e58\u4ee52\uff0c\u6700\u7ec8\u7ed3\u679c\u4e3a<code>[0, 2, 4, 6, 8]<\/code>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528\u5faa\u73af\u6539\u53d8\u5217\u8868\u540d\u79f0\u5728Python\u7f16\u7a0b\u4e2d\u662f\u4e00\u9879\u9ad8\u7ea7\u6280\u5de7\uff0c\u6d89\u53ca\u5230\u52a8\u6001\u751f\u6210\u548c\u64cd\u4f5c\u53d8\u91cf\u540d\u3002 \u5728Python\u4e2d\uff0c\u6211\u4eec\u53ef [&hellip;]","protected":false},"author":3,"featured_media":1081456,"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\/1081442"}],"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=1081442"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1081442\/revisions"}],"predecessor-version":[{"id":1081458,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1081442\/revisions\/1081458"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1081456"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1081442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1081442"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1081442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}