{"id":1110855,"date":"2025-01-08T17:23:40","date_gmt":"2025-01-08T09:23:40","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1110855.html"},"modified":"2025-01-08T17:23:42","modified_gmt":"2025-01-08T09:23:42","slug":"python%e5%a6%82%e4%bd%95%e4%bb%8e%e5%88%97%e8%a1%a8%e4%b8%ad%e5%8f%96%e5%80%bc%e5%8a%a0%e5%85%a5%e5%ad%97%e5%85%b8%e4%b8%ad","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1110855.html","title":{"rendered":"python\u5982\u4f55\u4ece\u5217\u8868\u4e2d\u53d6\u503c\u52a0\u5165\u5b57\u5178\u4e2d"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25073530\/1b2409d8-35bc-40fd-8e5e-b149ea8fa85c.webp\" alt=\"python\u5982\u4f55\u4ece\u5217\u8868\u4e2d\u53d6\u503c\u52a0\u5165\u5b57\u5178\u4e2d\" \/><\/p>\n<p><p> <strong>Python\u4ece\u5217\u8868\u4e2d\u53d6\u503c\u5e76\u52a0\u5165\u5b57\u5178\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff1a\u4f7f\u7528\u5faa\u73af\u548c\u5b57\u5178\u63a8\u5bfc\u5f0f\u3001\u5229\u7528zip\u51fd\u6570\u3001\u4f7f\u7528enumerate\u51fd\u6570<\/strong>\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4e2d\u7684\u4e00\u79cd\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528\u5faa\u73af\u548c\u5b57\u5178\u63a8\u5bfc\u5f0f<\/strong>\uff1a\u8fd9\u662f\u6700\u5e38\u89c1\u7684\u65b9\u5f0f\u4e4b\u4e00\uff0c\u5b83\u901a\u8fc7\u5faa\u73af\u904d\u5386\u5217\u8868\u4e2d\u7684\u5143\u7d20\uff0c\u5e76\u5c06\u5176\u4f5c\u4e3a\u952e\u503c\u5bf9\u6dfb\u52a0\u5230\u5b57\u5178\u4e2d\u3002\u4f8b\u5982\uff0c\u5982\u679c\u6211\u4eec\u6709\u4e00\u4e2a\u5305\u542b\u952e\u548c\u503c\u7684\u5217\u8868\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528for\u5faa\u73af\u6765\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u5faa\u73af\u548c\u5b57\u5178\u63a8\u5bfc\u5f0f<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528\u5faa\u73af\u548c\u5b57\u5178\u63a8\u5bfc\u5f0f\u5c06\u5217\u8868\u4e2d\u7684\u503c\u52a0\u5165\u5b57\u5178\u4e2d\u662f\u6700\u5e38\u89c1\u7684\u65b9\u5f0f\u4e4b\u4e00\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7for\u5faa\u73af\u904d\u5386\u5217\u8868\u4e2d\u7684\u5143\u7d20\uff0c\u5e76\u5c06\u5176\u4f5c\u4e3a\u952e\u503c\u5bf9\u6dfb\u52a0\u5230\u5b57\u5178\u4e2d\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u8be6\u7ec6\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u5217\u8868<\/p>\n<p>keys = [&#39;name&#39;, &#39;age&#39;, &#39;city&#39;]<\/p>\n<p>values = [&#39;Alice&#39;, 25, &#39;New York&#39;]<\/p>\n<h2><strong>\u4f7f\u7528for\u5faa\u73af\u548c\u5b57\u5178\u63a8\u5bfc\u5f0f<\/strong><\/h2>\n<p>my_dict = {}<\/p>\n<p>for i in range(len(keys)):<\/p>\n<p>    my_dict[keys[i]] = values[i]<\/p>\n<p>print(my_dict)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u6709\u4e24\u4e2a\u5217\u8868\uff1a<code>keys<\/code>\u548c<code>values<\/code>\u3002\u6211\u4eec\u4f7f\u7528<code>for<\/code>\u5faa\u73af\u904d\u5386<code>keys<\/code>\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\uff0c\u5e76\u5c06\u76f8\u5e94\u7684<code>values<\/code>\u5217\u8868\u4e2d\u7684\u5143\u7d20\u4f5c\u4e3a\u503c\u6dfb\u52a0\u5230\u5b57\u5178\u4e2d\u3002\u6700\u7ec8\uff0c\u6211\u4eec\u5f97\u5230\u4e00\u4e2a\u5305\u542b\u952e\u503c\u5bf9\u7684\u5b57\u5178\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528zip\u51fd\u6570<\/h3>\n<\/p>\n<p><p><code>zip<\/code>\u51fd\u6570\u53ef\u4ee5\u5c06\u4e24\u4e2a\u6216\u591a\u4e2a\u5e8f\u5217\uff08\u5217\u8868\u3001\u5143\u7ec4\u7b49\uff09\u201c\u538b\u7f29\u201d\u5728\u4e00\u8d77\uff0c\u5f62\u6210\u4e00\u4e2a\u5305\u542b\u5143\u7ec4\u7684\u8fed\u4ee3\u5668\u3002\u6bcf\u4e2a\u5143\u7ec4\u5305\u542b\u6765\u81ea\u6240\u6709\u8f93\u5165\u5e8f\u5217\u7684\u5143\u7d20\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>zip<\/code>\u51fd\u6570\u5c06\u952e\u5217\u8868\u548c\u503c\u5217\u8868\u538b\u7f29\u5728\u4e00\u8d77\uff0c\u7136\u540e\u5c06\u5176\u8f6c\u6362\u4e3a\u5b57\u5178\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u5217\u8868<\/p>\n<p>keys = [&#39;name&#39;, &#39;age&#39;, &#39;city&#39;]<\/p>\n<p>values = [&#39;Alice&#39;, 25, &#39;New York&#39;]<\/p>\n<h2><strong>\u4f7f\u7528zip\u51fd\u6570<\/strong><\/h2>\n<p>my_dict = dict(zip(keys, values))<\/p>\n<p>print(my_dict)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>zip<\/code>\u51fd\u6570\u5c06<code>keys<\/code>\u548c<code>values<\/code>\u5217\u8868\u538b\u7f29\u5728\u4e00\u8d77\uff0c\u5f62\u6210\u4e00\u4e2a\u5305\u542b\u5143\u7ec4\u7684\u8fed\u4ee3\u5668\u3002\u7136\u540e\uff0c\u6211\u4eec\u4f7f\u7528<code>dict<\/code>\u51fd\u6570\u5c06\u8fd9\u4e2a\u8fed\u4ee3\u5668\u8f6c\u6362\u4e3a\u5b57\u5178\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528enumerate\u51fd\u6570<\/h3>\n<\/p>\n<p><p><code>enumerate<\/code>\u51fd\u6570\u53ef\u4ee5\u540c\u65f6\u904d\u5386\u5217\u8868\u7684\u7d22\u5f15\u548c\u503c\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>enumerate<\/code>\u51fd\u6570\u904d\u5386\u952e\u5217\u8868\uff0c\u5e76\u4f7f\u7528\u7d22\u5f15\u4ece\u503c\u5217\u8868\u4e2d\u83b7\u53d6\u76f8\u5e94\u7684\u503c\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u5217\u8868<\/p>\n<p>keys = [&#39;name&#39;, &#39;age&#39;, &#39;city&#39;]<\/p>\n<p>values = [&#39;Alice&#39;, 25, &#39;New York&#39;]<\/p>\n<h2><strong>\u4f7f\u7528enumerate\u51fd\u6570<\/strong><\/h2>\n<p>my_dict = {key: values[i] for i, key in enumerate(keys)}<\/p>\n<p>print(my_dict)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>enumerate<\/code>\u51fd\u6570\u904d\u5386<code>keys<\/code>\u5217\u8868\uff0c\u5e76\u540c\u65f6\u83b7\u53d6\u7d22\u5f15\u548c\u503c\u3002\u7136\u540e\uff0c\u6211\u4eec\u4f7f\u7528\u5b57\u5178\u63a8\u5bfc\u5f0f\u5c06\u952e\u548c\u503c\u6dfb\u52a0\u5230\u5b57\u5178\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5904\u7406\u5d4c\u5957\u5217\u8868<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0c\u6211\u4eec\u7684\u5217\u8868\u53ef\u80fd\u662f\u5d4c\u5957\u7684\uff0c\u8fd9\u610f\u5473\u7740\u6bcf\u4e2a\u5143\u7d20\u672c\u8eab\u4e5f\u662f\u4e00\u4e2a\u5217\u8868\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u7c7b\u4f3c\u7684\u65b9\u6cd5\u6765\u5904\u7406\u5d4c\u5957\u5217\u8868\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u5d4c\u5957\u5217\u8868<\/p>\n<p>nested_list = [[&#39;name&#39;, &#39;Alice&#39;], [&#39;age&#39;, 25], [&#39;city&#39;, &#39;New York&#39;]]<\/p>\n<h2><strong>\u4f7f\u7528\u5b57\u5178\u63a8\u5bfc\u5f0f\u5904\u7406\u5d4c\u5957\u5217\u8868<\/strong><\/h2>\n<p>my_dict = {item[0]: item[1] for item in nested_list}<\/p>\n<p>print(my_dict)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u6709\u4e00\u4e2a\u5d4c\u5957\u5217\u8868<code>nested_list<\/code>\uff0c\u5176\u4e2d\u6bcf\u4e2a\u5143\u7d20\u90fd\u662f\u4e00\u4e2a\u5305\u542b\u952e\u548c\u503c\u7684\u5217\u8868\u3002\u6211\u4eec\u4f7f\u7528\u5b57\u5178\u63a8\u5bfc\u5f0f\u904d\u5386\u5d4c\u5957\u5217\u8868\uff0c\u5e76\u5c06\u6bcf\u4e2a\u5b50\u5217\u8868\u7684\u7b2c\u4e00\u4e2a\u5143\u7d20\u4f5c\u4e3a\u952e\uff0c\u7b2c\u4e8c\u4e2a\u5143\u7d20\u4f5c\u4e3a\u503c\u6dfb\u52a0\u5230\u5b57\u5178\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u5904\u7406\u5217\u8868\u4e2d\u7684\u5b57\u5178<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0c\u6211\u4eec\u7684\u5217\u8868\u53ef\u80fd\u5305\u542b\u5b57\u5178\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u7c7b\u4f3c\u7684\u65b9\u6cd5\u6765\u5904\u7406\u8fd9\u79cd\u60c5\u51b5\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u5217\u8868\u4e2d\u7684\u5b57\u5178<\/p>\n<p>list_of_dicts = [{&#39;name&#39;: &#39;Alice&#39;}, {&#39;age&#39;: 25}, {&#39;city&#39;: &#39;New York&#39;}]<\/p>\n<h2><strong>\u5408\u5e76\u5217\u8868\u4e2d\u7684\u5b57\u5178<\/strong><\/h2>\n<p>my_dict = {}<\/p>\n<p>for d in list_of_dicts:<\/p>\n<p>    my_dict.update(d)<\/p>\n<p>print(my_dict)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u6709\u4e00\u4e2a\u5305\u542b\u5b57\u5178\u7684\u5217\u8868<code>list_of_dicts<\/code>\u3002\u6211\u4eec\u4f7f\u7528<code>for<\/code>\u5faa\u73af\u904d\u5386\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u5b57\u5178\uff0c\u5e76\u4f7f\u7528<code>update<\/code>\u65b9\u6cd5\u5c06\u5176\u5408\u5e76\u5230\u4e00\u4e2a\u5b57\u5178\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u5904\u7406\u590d\u6742\u7684\u6570\u636e\u7ed3\u6784<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u5904\u7406\u66f4\u590d\u6742\u7684\u6570\u636e\u7ed3\u6784\uff0c\u4f8b\u5982\u5d4c\u5957\u5b57\u5178\u6216\u5305\u542b\u591a\u7ea7\u5d4c\u5957\u7684\u5217\u8868\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u9012\u5f52\u51fd\u6570\u6765\u5904\u7406\u8fd9\u79cd\u60c5\u51b5\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b\u590d\u6742\u6570\u636e\u7ed3\u6784<\/p>\n<p>complex_data = {<\/p>\n<p>    &#39;user1&#39;: {&#39;name&#39;: &#39;Alice&#39;, &#39;age&#39;: 25},<\/p>\n<p>    &#39;user2&#39;: {&#39;name&#39;: &#39;Bob&#39;, &#39;age&#39;: 30},<\/p>\n<p>    &#39;user3&#39;: {&#39;name&#39;: &#39;Charlie&#39;, &#39;age&#39;: 35}<\/p>\n<p>}<\/p>\n<h2><strong>\u9012\u5f52\u51fd\u6570\u5904\u7406\u590d\u6742\u6570\u636e\u7ed3\u6784<\/strong><\/h2>\n<p>def flatten_dict(d, parent_key=&#39;&#39;, sep=&#39;_&#39;):<\/p>\n<p>    items = []<\/p>\n<p>    for k, v in d.items():<\/p>\n<p>        new_key = parent_key + sep + k if parent_key else k<\/p>\n<p>        if isinstance(v, dict):<\/p>\n<p>            items.extend(flatten_dict(v, new_key, sep=sep).items())<\/p>\n<p>        else:<\/p>\n<p>            items.append((new_key, v))<\/p>\n<p>    return dict(items)<\/p>\n<p>flat_dict = flatten_dict(complex_data)<\/p>\n<p>print(flat_dict)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u6709\u4e00\u4e2a\u5305\u542b\u5d4c\u5957\u5b57\u5178\u7684\u590d\u6742\u6570\u636e\u7ed3\u6784<code>complex_data<\/code>\u3002\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u9012\u5f52\u51fd\u6570<code>flatten_dict<\/code>\uff0c\u5b83\u904d\u5386\u5d4c\u5957\u5b57\u5178\u5e76\u5c06\u5176\u5c55\u5e73\u4e3a\u4e00\u4e2a\u5355\u7ea7\u5b57\u5178\u3002\u6211\u4eec\u4f7f\u7528\u8fd9\u4e2a\u51fd\u6570\u6765\u5904\u7406\u590d\u6742\u6570\u636e\u7ed3\u6784\uff0c\u6700\u7ec8\u5f97\u5230\u4e00\u4e2a\u5c55\u5e73\u7684\u5b57\u5178\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86Python\u4ece\u5217\u8868\u4e2d\u53d6\u503c\u5e76\u52a0\u5165\u5b57\u5178\u7684\u591a\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528\u5faa\u73af\u548c\u5b57\u5178\u63a8\u5bfc\u5f0f\u3001zip\u51fd\u6570\u3001enumerate\u51fd\u6570\u3001\u5904\u7406\u5d4c\u5957\u5217\u8868\u3001\u5904\u7406\u5217\u8868\u4e2d\u7684\u5b57\u5178\u4ee5\u53ca\u5904\u7406\u590d\u6742\u6570\u636e\u7ed3\u6784\u3002\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u7075\u6d3b\u5730\u5904\u7406\u5404\u79cd\u7c7b\u578b\u7684\u5217\u8868\u548c\u5b57\u5178\uff0c\u5e76\u5c06\u5b83\u4eec\u8f6c\u6362\u4e3a\u6240\u9700\u7684\u683c\u5f0f\u3002\u5e0c\u671b\u8fd9\u4e9b\u65b9\u6cd5\u80fd\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u5904\u7406\u5217\u8868\u548c\u5b57\u5178\u7684\u8f6c\u6362\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5c06Python\u5217\u8868\u4e2d\u7684\u7279\u5b9a\u5143\u7d20\u6dfb\u52a0\u5230\u5b57\u5178\u4e2d\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528\u5faa\u73af\u904d\u5386\u5217\u8868\u4e2d\u7684\u5143\u7d20\uff0c\u5e76\u6839\u636e\u9700\u8981\u5c06\u5b83\u4eec\u6dfb\u52a0\u5230\u5b57\u5178\u4e2d\u3002\u4f8b\u5982\uff0c\u4f7f\u7528for\u5faa\u73af\u904d\u5386\u5217\u8868\uff0c\u5e76\u901a\u8fc7\u952e\u503c\u5bf9\u7684\u65b9\u5f0f\u5c06\u5143\u7d20\u5b58\u50a8\u5728\u5b57\u5178\u4e2d\u3002\u4f60\u53ef\u4ee5\u6839\u636e\u6761\u4ef6\u9009\u62e9\u6027\u5730\u5c06\u5143\u7d20\u6dfb\u52a0\u5230\u5b57\u5178\u4e2d\uff0c\u4f8b\u5982\u53ea\u6dfb\u52a0\u5076\u6570\u6216\u6ee1\u8db3\u67d0\u4e2a\u6807\u51c6\u7684\u5143\u7d20\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u901a\u8fc7\u5217\u8868\u751f\u6210\u5b57\u5178\uff1f<\/strong><br \/>Python\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u5b57\u5178\u3002\u6bd4\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b57\u5178\u63a8\u5bfc\u5f0f\uff0c\u7ed3\u5408zip\u51fd\u6570\u5c06\u4e24\u4e2a\u5217\u8868\u5408\u5e76\u4e3a\u5b57\u5178\u3002\u6b64\u5916\uff0c\u4f7f\u7528enumerate\u51fd\u6570\u53ef\u4ee5\u5c06\u5217\u8868\u7684\u7d22\u5f15\u4f5c\u4e3a\u5b57\u5178\u7684\u952e\uff0c\u5217\u8868\u7684\u503c\u4f5c\u4e3a\u5b57\u5178\u7684\u503c\u3002\u8fd9\u4e9b\u65b9\u6cd5\u4f7f\u5f97\u4ece\u5217\u8868\u521b\u5efa\u5b57\u5178\u53d8\u5f97\u7b80\u5355\u800c\u9ad8\u6548\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u4ece\u5217\u8868\u4e2d\u63d0\u53d6\u7684\u91cd\u590d\u503c\uff0c\u4ee5\u786e\u4fdd\u5b57\u5178\u4e2d\u7684\u552f\u4e00\u6027\uff1f<\/strong><br \/>\u5728\u5c06\u5217\u8868\u4e2d\u7684\u503c\u6dfb\u52a0\u5230\u5b57\u5178\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u96c6\u5408(set)\u6765\u786e\u4fdd\u552f\u4e00\u6027\u3002\u901a\u8fc7\u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u96c6\u5408\uff0c\u80fd\u591f\u81ea\u52a8\u79fb\u9664\u91cd\u590d\u503c\u3002\u63a5\u7740\uff0c\u53ef\u4ee5\u5c06\u96c6\u5408\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u9010\u4e2a\u6dfb\u52a0\u5230\u5b57\u5178\u4e2d\uff0c\u786e\u4fdd\u5b57\u5178\u7684\u952e\u662f\u552f\u4e00\u7684\u3002\u8fd9\u79cd\u65b9\u6cd5\u6709\u52a9\u4e8e\u907f\u514d\u5b57\u5178\u4e2d\u7684\u91cd\u590d\u9879\uff0c\u4fdd\u6301\u6570\u636e\u6574\u6d01\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4ece\u5217\u8868\u4e2d\u53d6\u503c\u5e76\u52a0\u5165\u5b57\u5178\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff1a\u4f7f\u7528\u5faa\u73af\u548c\u5b57\u5178\u63a8\u5bfc\u5f0f\u3001\u5229\u7528zip\u51fd\u6570\u3001\u4f7f\u7528enumerate\u51fd [&hellip;]","protected":false},"author":3,"featured_media":1110863,"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\/1110855"}],"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=1110855"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1110855\/revisions"}],"predecessor-version":[{"id":1110867,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1110855\/revisions\/1110867"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1110863"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1110855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1110855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1110855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}