{"id":1129638,"date":"2025-01-08T20:31:14","date_gmt":"2025-01-08T12:31:14","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1129638.html"},"modified":"2025-01-08T20:31:17","modified_gmt":"2025-01-08T12:31:17","slug":"python%e5%a6%82%e4%bd%95%e5%b0%86list%e4%b8%ad%e7%9a%84%e5%80%bc%e8%be%93%e5%85%a5%e5%ad%97%e5%85%b8","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1129638.html","title":{"rendered":"python\u5982\u4f55\u5c06list\u4e2d\u7684\u503c\u8f93\u5165\u5b57\u5178"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25100002\/c1d5eb64-6c58-47e1-8a51-b2f02f8d26cc.webp\" alt=\"python\u5982\u4f55\u5c06list\u4e2d\u7684\u503c\u8f93\u5165\u5b57\u5178\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u5c06list\u4e2d\u7684\u503c\u8f93\u5165\u5b57\u5178\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff1a\u4f7f\u7528\u7d22\u5f15\u3001\u4f7f\u7528zip\u51fd\u6570\u3001\u901a\u8fc7\u5b57\u5178\u63a8\u5bfc\u5f0f\u3001\u4f7f\u7528\u5faa\u73af\u904d\u5386\u3002<\/strong> \u5176\u4e2d\uff0c<strong>\u4f7f\u7528zip\u51fd\u6570<\/strong> \u662f\u4e00\u79cd\u8f83\u4e3a\u7b80\u6d01\u4e14\u6709\u6548\u7684\u65b9\u6cd5\uff0c\u7279\u522b\u9002\u7528\u4e8e\u4e24\u4e2alist\u7684\u60c5\u51b5\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u79cd\u65b9\u6cd5\u5e76\u7ed9\u51fa\u4ee3\u7801\u793a\u4f8b\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528zip\u51fd\u6570\u7684\u65b9\u6cd5\u53ef\u4ee5\u5c06\u4e24\u4e2a\u5217\u8868\u7ed3\u5408\u6210\u4e00\u4e2a\u5b57\u5178\uff0c\u5047\u8bbe\u6211\u4eec\u6709\u4e24\u4e2a\u5217\u8868\uff0c\u4e00\u4e2a\u8868\u793a\u952e\uff0c\u53e6\u4e00\u4e2a\u8868\u793a\u503c\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528zip\u51fd\u6570\u5c06\u8fd9\u4e24\u4e2a\u5217\u8868\u6210\u5bf9\u7ec4\u5408\uff0c\u7136\u540e\u5c06\u5176\u8f6c\u6362\u4e3a\u5b57\u5178\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">keys = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;]<\/p>\n<p>values = [1, 2, 3]<\/p>\n<p>dictionary = dict(zip(keys, values))<\/p>\n<p>print(dictionary)  # {&#39;a&#39;: 1, &#39;b&#39;: 2, &#39;c&#39;: 3}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0b\u9762\u6211\u4eec\u5c06\u901a\u8fc7\u51e0\u4e2a\u5c0f\u6807\u9898\u8be6\u7ec6\u4ecb\u7ecd\u4e0d\u540c\u7684\u65b9\u6cd5\u548c\u573a\u666f\u3002<\/p>\n<\/p>\n<h2><strong>\u4e00\u3001\u4f7f\u7528\u7d22\u5f15<\/strong><\/h2>\n<p><p>\u4f7f\u7528\u7d22\u5f15\u65b9\u6cd5\u9002\u7528\u4e8e\u5f53\u6211\u4eec\u6709\u4e00\u4e2a\u5305\u542b\u952e\u7684\u5217\u8868\u548c\u4e00\u4e2a\u5305\u542b\u503c\u7684\u5217\u8868\u65f6\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u904d\u5386\u7d22\u5f15\u6765\u5c06\u8fd9\u4e9b\u503c\u7ec4\u6210\u5b57\u5178\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">keys = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;]<\/p>\n<p>values = [1, 2, 3]<\/p>\n<p>dictionary = {}<\/p>\n<p>for i in range(len(keys)):<\/p>\n<p>    dictionary[keys[i]] = values[i]<\/p>\n<p>print(dictionary)  # {&#39;a&#39;: 1, &#39;b&#39;: 2, &#39;c&#39;: 3}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\u7b80\u5355\u76f4\u89c2\uff0c\u4f46\u5728\u5904\u7406\u5927\u578b\u6570\u636e\u96c6\u65f6\u53ef\u80fd\u6548\u7387\u8f83\u4f4e\u3002<\/p>\n<\/p>\n<h2><strong>\u4e8c\u3001\u4f7f\u7528zip\u51fd\u6570<\/strong><\/h2>\n<p><p>\u5982\u524d\u6240\u8ff0\uff0c\u4f7f\u7528zip\u51fd\u6570\u53ef\u4ee5\u5c06\u4e24\u4e2a\u5217\u8868\u7ec4\u5408\u6210\u4e00\u4e2a\u5b57\u5178\u3002\u8fd9\u79cd\u65b9\u6cd5\u65e2\u7b80\u6d01\u53c8\u9ad8\u6548\uff0c\u5c24\u5176\u9002\u7528\u4e8e\u5904\u7406\u952e\u503c\u5bf9\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">keys = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;]<\/p>\n<p>values = [1, 2, 3]<\/p>\n<p>dictionary = dict(zip(keys, values))<\/p>\n<p>print(dictionary)  # {&#39;a&#39;: 1, &#39;b&#39;: 2, &#39;c&#39;: 3}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6211\u4eec\u8fd8\u53ef\u4ee5\u901a\u8fc7\u8fdb\u4e00\u6b65\u4f18\u5316zip\u51fd\u6570\u7684\u4f7f\u7528\u6765\u5904\u7406\u66f4\u591a\u590d\u6742\u7684\u60c5\u51b5\uff0c\u4f8b\u5982\u5904\u7406\u591a\u4e2a\u5217\u8868\u6216\u5d4c\u5957\u5217\u8868\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">keys = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;]<\/p>\n<p>values = [1, 2, 3]<\/p>\n<p>extra_values = [4, 5, 6]<\/p>\n<p>dictionary = {k: (v1, v2) for k, v1, v2 in zip(keys, values, extra_values)}<\/p>\n<p>print(dictionary)  # {&#39;a&#39;: (1, 4), &#39;b&#39;: (2, 5), &#39;c&#39;: (3, 6)}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<h2><strong>\u4e09\u3001\u901a\u8fc7\u5b57\u5178\u63a8\u5bfc\u5f0f<\/strong><\/h2>\n<p><p>\u5b57\u5178\u63a8\u5bfc\u5f0f\u662f\u4e00\u79cd\u7c7b\u4f3c\u4e8e\u5217\u8868\u63a8\u5bfc\u5f0f\u7684\u8bed\u6cd5\u7cd6\uff0c\u53ef\u4ee5\u4f7f\u5f97\u4ee3\u7801\u66f4\u52a0\u7b80\u6d01\u660e\u4e86\u3002\u5bf9\u4e8e\u6709\u7ecf\u9a8c\u7684Python\u7a0b\u5e8f\u5458\uff0c\u8fd9\u79cd\u65b9\u6cd5\u975e\u5e38\u9ad8\u6548\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">keys = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;]<\/p>\n<p>values = [1, 2, 3]<\/p>\n<p>dictionary = {keys[i]: values[i] for i in range(len(keys))}<\/p>\n<p>print(dictionary)  # {&#39;a&#39;: 1, &#39;b&#39;: 2, &#39;c&#39;: 3}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u5728\u5904\u7406\u7b80\u5355\u7684\u952e\u503c\u5bf9\u65f6\u975e\u5e38\u6709\u7528\uff0c\u4f46\u5728\u5904\u7406\u66f4\u590d\u6742\u7684\u6570\u636e\u7ed3\u6784\u65f6\u53ef\u80fd\u9700\u8981\u7ed3\u5408\u5176\u4ed6\u65b9\u6cd5\u4e00\u8d77\u4f7f\u7528\u3002<\/p>\n<\/p>\n<h2><strong>\u56db\u3001\u4f7f\u7528\u5faa\u73af\u904d\u5386<\/strong><\/h2>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u7279\u522b\u662f\u5f53\u6570\u636e\u7ed3\u6784\u8f83\u4e3a\u590d\u6742\u6216\u9700\u8981\u8fdb\u884c\u989d\u5916\u7684\u903b\u8f91\u5904\u7406\u65f6\uff0c\u4f7f\u7528\u5faa\u73af\u904d\u5386\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002\u6211\u4eec\u53ef\u4ee5\u5728\u5faa\u73af\u4e2d\u6839\u636e\u9700\u8981\u8fdb\u884c\u5404\u79cd\u64cd\u4f5c\uff0c\u4f8b\u5982\u6570\u636e\u8f6c\u6362\u6216\u6761\u4ef6\u5224\u65ad\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">keys = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;]<\/p>\n<p>values = [1, 2, 3]<\/p>\n<p>dictionary = {}<\/p>\n<p>for key, value in zip(keys, values):<\/p>\n<p>    if value &gt; 1:  # \u4f8b\u5982\uff0c\u6211\u4eec\u53ea\u6dfb\u52a0\u503c\u5927\u4e8e1\u7684\u952e\u503c\u5bf9<\/p>\n<p>        dictionary[key] = value<\/p>\n<p>print(dictionary)  # {&#39;b&#39;: 2, &#39;c&#39;: 3}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7684\u7075\u6d3b\u6027\u5f88\u9ad8\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u8fdb\u884c\u8c03\u6574\u3002<\/p>\n<\/p>\n<h2><strong>\u4e94\u3001\u5904\u7406\u5d4c\u5957\u5217\u8868<\/strong><\/h2>\n<p><p>\u5f53\u6211\u4eec\u5904\u7406\u5d4c\u5957\u5217\u8868\u65f6\uff0c\u53ef\u80fd\u9700\u8981\u66f4\u590d\u6742\u7684\u903b\u8f91\u6765\u5c06\u5176\u8f6c\u6362\u4e3a\u5b57\u5178\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u6709\u4e00\u4e2a\u5d4c\u5957\u5217\u8868\uff0c\u5176\u4e2d\u6bcf\u4e2a\u5b50\u5217\u8868\u5305\u542b\u952e\u503c\u5bf9\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">nested_list = [[&#39;a&#39;, 1], [&#39;b&#39;, 2], [&#39;c&#39;, 3]]<\/p>\n<p>dictionary = {item[0]: item[1] for item in nested_list}<\/p>\n<p>print(dictionary)  # {&#39;a&#39;: 1, &#39;b&#39;: 2, &#39;c&#39;: 3}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6211\u4eec\u8fd8\u53ef\u4ee5\u5904\u7406\u66f4\u590d\u6742\u7684\u5d4c\u5957\u7ed3\u6784\uff0c\u4f8b\u5982\u591a\u5c42\u5d4c\u5957\u5217\u8868\u6216\u5b57\u5178\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">nested_list = [[&#39;a&#39;, [1, 2]], [&#39;b&#39;, [2, 3]], [&#39;c&#39;, [3, 4]]]<\/p>\n<p>dictionary = {item[0]: item[1] for item in nested_list}<\/p>\n<p>print(dictionary)  # {&#39;a&#39;: [1, 2], &#39;b&#39;: [2, 3], &#39;c&#39;: [3, 4]}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<h2><strong>\u516d\u3001\u5904\u7406\u7f3a\u5931\u503c\u548c\u9ed8\u8ba4\u503c<\/strong><\/h2>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6211\u4eec\u53ef\u80fd\u4f1a\u9047\u5230\u5217\u8868\u957f\u5ea6\u4e0d\u4e00\u81f4\u6216\u7f3a\u5931\u503c\u7684\u60c5\u51b5\u3002\u53ef\u4ee5\u4f7f\u7528\u9ed8\u8ba4\u503c\u6216\u6761\u4ef6\u5224\u65ad\u6765\u5904\u7406\u8fd9\u4e9b\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">keys = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, &#39;d&#39;]<\/p>\n<p>values = [1, 2, 3]<\/p>\n<p>dictionary = {keys[i]: values[i] if i &lt; len(values) else None for i in range(len(keys))}<\/p>\n<p>print(dictionary)  # {&#39;a&#39;: 1, &#39;b&#39;: 2, &#39;c&#39;: 3, &#39;d&#39;: None}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528collections\u6a21\u5757\u4e2d\u7684defaultdict\u6765\u5904\u7406\u9ed8\u8ba4\u503c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from collections import defaultdict<\/p>\n<p>keys = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, &#39;d&#39;]<\/p>\n<p>values = [1, 2, 3]<\/p>\n<p>dictionary = defaultdict(lambda: &#39;default_value&#39;)<\/p>\n<p>for key, value in zip(keys, values):<\/p>\n<p>    dictionary[key] = value<\/p>\n<p>print(dictionary)  # {&#39;a&#39;: 1, &#39;b&#39;: 2, &#39;c&#39;: 3, &#39;d&#39;: &#39;default_value&#39;}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<h2><strong>\u4e03\u3001\u603b\u7ed3<\/strong><\/h2>\n<p><p>\u4f7f\u7528Python\u5c06list\u4e2d\u7684\u503c\u8f93\u5165\u5b57\u5178\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u548c\u6570\u636e\u7ed3\u6784\u3002<strong>\u4f7f\u7528zip\u51fd\u6570\u3001\u4f7f\u7528\u7d22\u5f15\u3001\u5b57\u5178\u63a8\u5bfc\u5f0f\u3001\u5faa\u73af\u904d\u5386<\/strong>\u7b49\u65b9\u6cd5\u5404\u6709\u4f18\u7f3a\u70b9\u3002\u5728\u5904\u7406\u5d4c\u5957\u5217\u8868\u3001\u7f3a\u5931\u503c\u548c\u9ed8\u8ba4\u503c\u65f6\uff0c\u9700\u8981\u6839\u636e\u5177\u4f53\u60c5\u51b5\u8fdb\u884c\u8c03\u6574\u3002\u901a\u8fc7\u638c\u63e1\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u66f4\u52a0\u9ad8\u6548\u5730\u5904\u7406\u548c\u8f6c\u6362\u6570\u636e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5c06\u5217\u8868\u4e2d\u7684\u503c\u8f6c\u6362\u4e3a\u5b57\u5178\u7684\u952e\uff1f<\/strong><br \/>\u5c06\u5217\u8868\u4e2d\u7684\u503c\u8f6c\u6362\u4e3a\u5b57\u5178\u7684\u952e\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\u3002\u53ef\u4ee5\u4f7f\u7528\u5b57\u5178\u63a8\u5bfc\u5f0f\uff0c\u7ed3\u5408<code>enumerate<\/code>\u51fd\u6570\u4e3a\u6bcf\u4e2a\u5143\u7d20\u751f\u6210\u4e00\u4e2a\u552f\u4e00\u7684\u952e\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u6709\u4e00\u4e2a\u5217\u8868<code>my_list = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;]<\/code>\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u521b\u5efa\u5b57\u5178\uff1a  <\/p>\n<pre><code class=\"language-python\">my_dict = {key: value for key, value in enumerate(my_list)}\n<\/code><\/pre>\n<p>\u8fd9\u5c06\u751f\u6210\u4e00\u4e2a\u5b57\u5178\uff0c\u952e\u4e3a\u7d22\u5f15\uff0c\u503c\u4e3a\u5217\u8868\u4e2d\u7684\u5143\u7d20\uff1a<code>{0: &#39;a&#39;, 1: &#39;b&#39;, 2: &#39;c&#39;}<\/code>\u3002\u5982\u679c\u5e0c\u671b\u4f7f\u7528\u5217\u8868\u4e2d\u7684\u503c\u4f5c\u4e3a\u952e\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u9ed8\u8ba4\u503c\uff0c\u4f8b\u5982\uff1a<code>my_dict = {value: None for value in my_list}<\/code>\uff0c\u7ed3\u679c\u4e3a<code>{&#39;a&#39;: None, &#39;b&#39;: None, &#39;c&#39;: None}<\/code>\u3002<\/p>\n<p><strong>\u5982\u4f55\u5c06\u4e24\u4e2a\u5217\u8868\u4e2d\u7684\u503c\u5408\u5e76\u4e3a\u5b57\u5178\uff1f<\/strong><br \/>\u5982\u679c\u624b\u5934\u6709\u4e24\u4e2a\u5217\u8868\uff0c\u4e00\u4e2a\u4f5c\u4e3a\u5b57\u5178\u7684\u952e\uff0c\u53e6\u4e00\u4e2a\u4f5c\u4e3a\u5bf9\u5e94\u7684\u503c\uff0c\u53ef\u4ee5\u4f7f\u7528<code>zip<\/code>\u51fd\u6570\u5c06\u5b83\u4eec\u5408\u5e76\u3002\u4f8b\u5982\uff0c\u7ed9\u5b9a<code>keys = [&#39;name&#39;, &#39;age&#39;, &#39;city&#39;]<\/code>\u548c<code>values = [&#39;Alice&#39;, 30, &#39;New York&#39;]<\/code>\uff0c\u53ef\u4ee5\u8fd9\u6837\u521b\u5efa\u5b57\u5178\uff1a  <\/p>\n<pre><code class=\"language-python\">my_dict = dict(zip(keys, values))\n<\/code><\/pre>\n<p>\u8fd9\u4e2a\u64cd\u4f5c\u5c06\u751f\u6210\u5b57\u5178\uff1a<code>{&#39;name&#39;: &#39;Alice&#39;, &#39;age&#39;: 30, &#39;city&#39;: &#39;New York&#39;}<\/code>\u3002\u8fd9\u79cd\u65b9\u6cd5\u7b80\u6d01\u9ad8\u6548\uff0c\u975e\u5e38\u9002\u5408\u5728\u9700\u8981\u5c06\u4e24\u4e2a\u76f8\u5173\u6570\u636e\u96c6\u5408\u5e76\u4e3a\u5b57\u5178\u65f6\u4f7f\u7528\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u5217\u8868\u4e2d\u91cd\u590d\u503c\u4ee5\u521b\u5efa\u5b57\u5178\uff1f<\/strong><br \/>\u5728\u5904\u7406\u5305\u542b\u91cd\u590d\u503c\u7684\u5217\u8868\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528<code>collections.defaultdict<\/code>\u6765\u521b\u5efa\u4e00\u4e2a\u5b57\u5178\uff0c\u4f7f\u6bcf\u4e2a\u952e\u5173\u8054\u5230\u4e00\u4e2a\u5217\u8868\uff0c\u4ece\u800c\u4fdd\u7559\u6240\u6709\u91cd\u590d\u9879\u3002\u4f8b\u5982\uff0c\u8003\u8651\u5217\u8868<code>my_list = [&#39;apple&#39;, &#39;banana&#39;, &#39;apple&#39;, &#39;orange&#39;]<\/code>\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\uff1a  <\/p>\n<pre><code class=\"language-python\">from collections import defaultdict\n\nmy_dict = defaultdict(list)\nfor item in my_list:\n    my_dict[item].append(item)\n<\/code><\/pre>\n<p>\u8fd9\u5c06\u751f\u6210\u4e00\u4e2a\u5b57\u5178\uff0c\u5176\u4e2d\u6bcf\u4e2a\u6c34\u679c\u7684\u540d\u79f0\u4f5c\u4e3a\u952e\uff0c\u952e\u7684\u503c\u662f\u4e00\u4e2a\u5305\u542b\u6240\u6709\u51fa\u73b0\u6b21\u6570\u7684\u5217\u8868\uff1a<code>{&#39;apple&#39;: [&#39;apple&#39;, &#39;apple&#39;], &#39;banana&#39;: [&#39;banana&#39;], &#39;orange&#39;: [&#39;orange&#39;]}<\/code>\u3002\u8fd9\u79cd\u65b9\u5f0f\u786e\u4fdd\u4e86\u6240\u6709\u91cd\u590d\u503c\u90fd\u80fd\u88ab\u8bb0\u5f55\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u5c06list\u4e2d\u7684\u503c\u8f93\u5165\u5b57\u5178\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff1a\u4f7f\u7528\u7d22\u5f15\u3001\u4f7f\u7528zip\u51fd\u6570\u3001\u901a\u8fc7\u5b57\u5178\u63a8\u5bfc\u5f0f\u3001\u4f7f\u7528\u5faa\u73af\u904d\u5386\u3002 [&hellip;]","protected":false},"author":3,"featured_media":1129645,"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\/1129638"}],"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=1129638"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1129638\/revisions"}],"predecessor-version":[{"id":1129646,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1129638\/revisions\/1129646"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1129645"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1129638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1129638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1129638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}