{"id":1177313,"date":"2025-01-15T17:56:35","date_gmt":"2025-01-15T09:56:35","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1177313.html"},"modified":"2025-01-15T17:56:38","modified_gmt":"2025-01-15T09:56:38","slug":"python%e5%a6%82%e4%bd%95%e5%81%9a%e6%8a%bd%e5%a5%96%e8%bd%af%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1177313.html","title":{"rendered":"python\u5982\u4f55\u505a\u62bd\u5956\u8f6f\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25112246\/78464fc2-b15e-4dc6-9c57-c546a97231e9.webp\" alt=\"python\u5982\u4f55\u505a\u62bd\u5956\u8f6f\u4ef6\" \/><\/p>\n<p><p> <strong>Python\u5982\u4f55\u505a\u62bd\u5956\u8f6f\u4ef6<\/strong><\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528Python\u7f16\u5199\u62bd\u5956\u8f6f\u4ef6\uff0c\u9700\u8981\u4f7f\u7528\u968f\u673a\u6570\u751f\u6210\u3001\u6570\u636e\u5b58\u50a8\u3001\u754c\u9762\u8bbe\u8ba1\u7b49\u6280\u672f\u3002<\/strong> \u9996\u5148\uff0c\u6211\u4eec\u53ef\u4ee5\u5229\u7528Python\u7684random\u6a21\u5757\u751f\u6210\u968f\u673a\u6570\u6765\u786e\u5b9a\u4e2d\u5956\u8005\uff0c\u63a5\u7740\u53ef\u4ee5\u4f7f\u7528\u5b57\u5178\u6216\u6570\u636e\u5e93\u6765\u5b58\u50a8\u53c2\u4e0e\u8005\u4fe1\u606f\uff0c\u6700\u540e\u53ef\u4ee5\u5229\u7528tkinter\u7b49GUI\u5e93\u6765\u8bbe\u8ba1\u7528\u6237\u754c\u9762\u3002\u8fd9\u91cc\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Python\u5b9e\u73b0\u4e00\u4e2a\u7b80\u5355\u7684\u62bd\u5956\u8f6f\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u968f\u673a\u6570\u751f\u6210<\/h3>\n<\/p>\n<p><p>Python\u7684random\u6a21\u5757\u63d0\u4f9b\u4e86\u8bb8\u591a\u968f\u673a\u6570\u751f\u6210\u51fd\u6570\uff0c\u53ef\u4ee5\u7528\u6765\u5b9e\u73b0\u62bd\u5956\u7684\u968f\u673a\u6027\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5bfc\u5165random\u6a21\u5757<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import random<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u751f\u6210\u968f\u673a\u6570<\/h4>\n<\/p>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>random.randint(a, b)<\/code>\u751f\u6210\u4e00\u4e2a\u8303\u56f4\u5728a\u5230b\u4e4b\u95f4\u7684\u968f\u673a\u6574\u6570\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">winner = random.randint(1, 100)<\/p>\n<p>print(f&quot;The winner is number {winner}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u4ece\u5217\u8868\u4e2d\u968f\u673a\u9009\u62e9<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u6211\u4eec\u6709\u4e00\u4e2a\u53c2\u4e0e\u8005\u540d\u5355\uff0c\u53ef\u4ee5\u4f7f\u7528<code>random.choice()<\/code>\u4ece\u4e2d\u968f\u673a\u9009\u62e9\u4e00\u540d\u5e78\u8fd0\u513f\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">participants = [&#39;Alice&#39;, &#39;Bob&#39;, &#39;Charlie&#39;, &#39;David&#39;]<\/p>\n<p>winner = random.choice(participants)<\/p>\n<p>print(f&quot;The winner is {winner}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u6570\u636e\u5b58\u50a8<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53c2\u4e0e\u8005\u7684\u4fe1\u606f\u53ef\u80fd\u9700\u8981\u5b58\u50a8\u5728\u6587\u4ef6\u6216\u6570\u636e\u5e93\u4e2d\u4ee5\u4fbf\u7ba1\u7406\u548c\u67e5\u8be2\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528\u5b57\u5178\u5b58\u50a8\u53c2\u4e0e\u8005\u4fe1\u606f<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u53c2\u4e0e\u8005\u6570\u91cf\u4e0d\u591a\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u7684\u5b57\u5178\u6765\u5b58\u50a8\u4fe1\u606f\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">participants = {<\/p>\n<p>    1: &#39;Alice&#39;,<\/p>\n<p>    2: &#39;Bob&#39;,<\/p>\n<p>    3: &#39;Charlie&#39;,<\/p>\n<p>    4: &#39;David&#39;<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528CSV\u6587\u4ef6\u5b58\u50a8\u53c2\u4e0e\u8005\u4fe1\u606f<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u8f83\u5927\u7684\u6570\u636e\u96c6\uff0c\u53ef\u4ee5\u4f7f\u7528CSV\u6587\u4ef6\u6765\u5b58\u50a8\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import csv<\/p>\n<h2><strong>\u8bfb\u53d6CSV\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;participants.csv&#39;, mode=&#39;r&#39;) as file:<\/p>\n<p>    reader = csv.reader(file)<\/p>\n<p>    participants = {rows[0]: rows[1] for rows in reader}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u4f7f\u7528SQLite\u6570\u636e\u5e93\u5b58\u50a8\u53c2\u4e0e\u8005\u4fe1\u606f<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528SQLite\u6570\u636e\u5e93\u53ef\u4ee5\u66f4\u9ad8\u6548\u5730\u7ba1\u7406\u6570\u636e\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sqlite3<\/p>\n<h2><strong>\u8fde\u63a5\u5230SQLite\u6570\u636e\u5e93<\/strong><\/h2>\n<p>conn = sqlite3.connect(&#39;participants.db&#39;)<\/p>\n<p>cursor = conn.cursor()<\/p>\n<h2><strong>\u521b\u5efa\u8868<\/strong><\/h2>\n<p>cursor.execute(&#39;&#39;&#39;CREATE TABLE IF NOT EXISTS participants<\/p>\n<p>                  (id INTEGER PRIMARY KEY, name TEXT)&#39;&#39;&#39;)<\/p>\n<h2><strong>\u63d2\u5165\u6570\u636e<\/strong><\/h2>\n<p>cursor.execute(&quot;INSERT INTO participants (name) VALUES (&#39;Alice&#39;)&quot;)<\/p>\n<p>cursor.execute(&quot;INSERT INTO participants (name) VALUES (&#39;Bob&#39;)&quot;)<\/p>\n<h2><strong>\u67e5\u8be2\u6570\u636e<\/strong><\/h2>\n<p>cursor.execute(&quot;SELECT * FROM participants&quot;)<\/p>\n<p>participants = cursor.fetchall()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u754c\u9762\u8bbe\u8ba1<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u8ba9\u62bd\u5956\u8f6f\u4ef6\u66f4\u53cb\u597d\uff0c\u53ef\u4ee5\u4f7f\u7528tkinter\u5e93\u6765\u521b\u5efa\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5bfc\u5165tkinter\u6a21\u5757<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>from tkinter import messagebox<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u521b\u5efa\u4e3b\u7a97\u53e3<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">root = tk.Tk()<\/p>\n<p>root.title(&quot;\u62bd\u5956\u8f6f\u4ef6&quot;)<\/p>\n<p>root.geometry(&quot;300x200&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u6dfb\u52a0\u6309\u94ae\u548c\u6807\u7b7e<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">label = tk.Label(root, text=&quot;\u70b9\u51fb\u6309\u94ae\u5f00\u59cb\u62bd\u5956&quot;)<\/p>\n<p>label.pack(pady=20)<\/p>\n<p>def draw_winner():<\/p>\n<p>    winner = random.choice(list(participants.values()))<\/p>\n<p>    messagebox.showinfo(&quot;\u4e2d\u5956\u8005&quot;, f&quot;\u606d\u559c {winner} \u83b7\u5956\uff01&quot;)<\/p>\n<p>button = tk.Button(root, text=&quot;\u62bd\u5956&quot;, command=draw_winner)<\/p>\n<p>button.pack(pady=20)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4\u3001\u542f\u52a8\u4e3b\u5faa\u73af<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">root.m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>nloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u529f\u80fd\u6269\u5c55<\/h3>\n<\/p>\n<p><h4>1\u3001\u589e\u52a0\u591a\u6b21\u62bd\u5956\u529f\u80fd<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u4e00\u4e2a\u5faa\u73af\u6765\u5b9e\u73b0\u591a\u6b21\u62bd\u5956\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def draw_multiple_winners(num_winners):<\/p>\n<p>    winners = random.sample(list(participants.values()), num_winners)<\/p>\n<p>    messagebox.showinfo(&quot;\u4e2d\u5956\u8005&quot;, f&quot;\u606d\u559c {&#39;, &#39;.join(winners)} \u83b7\u5956\uff01&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u5b58\u50a8\u62bd\u5956\u8bb0\u5f55<\/h4>\n<\/p>\n<p><p>\u4e3a\u4e86\u8bb0\u5f55\u6bcf\u6b21\u62bd\u5956\u7684\u7ed3\u679c\uff0c\u53ef\u4ee5\u5c06\u4e2d\u5956\u8005\u4fe1\u606f\u5b58\u50a8\u5230\u6587\u4ef6\u6216\u6570\u636e\u5e93\u4e2d\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;winners.txt&#39;, &#39;a&#39;) as file:<\/p>\n<p>    file.write(f&quot;{winner}\\n&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u589e\u52a0\u53c2\u4e0e\u8005\u7ba1\u7406\u529f\u80fd<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u6dfb\u52a0\u529f\u80fd\u6765\u589e\u52a0\u3001\u5220\u9664\u548c\u4fee\u6539\u53c2\u4e0e\u8005\u4fe1\u606f\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def add_participant(name):<\/p>\n<p>    cursor.execute(&quot;INSERT INTO participants (name) VALUES (?)&quot;, (name,))<\/p>\n<p>    conn.commit()<\/p>\n<p>def delete_participant(name):<\/p>\n<p>    cursor.execute(&quot;DELETE FROM participants WHERE name=?&quot;, (name,))<\/p>\n<p>    conn.commit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u5b8c\u6574\u793a\u4f8b\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u7efc\u5408\u4ee5\u4e0a\u5185\u5bb9\uff0c\u4e0b\u9762\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u62bd\u5956\u8f6f\u4ef6\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import random<\/p>\n<p>import tkinter as tk<\/p>\n<p>from tkinter import messagebox<\/p>\n<p>import sqlite3<\/p>\n<h2><strong>\u8fde\u63a5\u5230SQLite\u6570\u636e\u5e93<\/strong><\/h2>\n<p>conn = sqlite3.connect(&#39;participants.db&#39;)<\/p>\n<p>cursor = conn.cursor()<\/p>\n<h2><strong>\u521b\u5efa\u8868<\/strong><\/h2>\n<p>cursor.execute(&#39;&#39;&#39;CREATE TABLE IF NOT EXISTS participants<\/p>\n<p>                  (id INTEGER PRIMARY KEY, name TEXT)&#39;&#39;&#39;)<\/p>\n<h2><strong>\u63d2\u5165\u6570\u636e<\/strong><\/h2>\n<p>participants_list = [&#39;Alice&#39;, &#39;Bob&#39;, &#39;Charlie&#39;, &#39;David&#39;]<\/p>\n<p>for participant in participants_list:<\/p>\n<p>    cursor.execute(&quot;INSERT INTO participants (name) VALUES (?)&quot;, (participant,))<\/p>\n<h2><strong>\u67e5\u8be2\u6570\u636e<\/strong><\/h2>\n<p>cursor.execute(&quot;SELECT * FROM participants&quot;)<\/p>\n<p>participants = cursor.fetchall()<\/p>\n<h2><strong>\u521b\u5efa\u4e3b\u7a97\u53e3<\/strong><\/h2>\n<p>root = tk.Tk()<\/p>\n<p>root.title(&quot;\u62bd\u5956\u8f6f\u4ef6&quot;)<\/p>\n<p>root.geometry(&quot;300x200&quot;)<\/p>\n<p>label = tk.Label(root, text=&quot;\u70b9\u51fb\u6309\u94ae\u5f00\u59cb\u62bd\u5956&quot;)<\/p>\n<p>label.pack(pady=20)<\/p>\n<p>def draw_winner():<\/p>\n<p>    winner = random.choice(participants)<\/p>\n<p>    messagebox.showinfo(&quot;\u4e2d\u5956\u8005&quot;, f&quot;\u606d\u559c {winner[1]} \u83b7\u5956\uff01&quot;)<\/p>\n<p>    with open(&#39;winners.txt&#39;, &#39;a&#39;) as file:<\/p>\n<p>        file.write(f&quot;{winner[1]}\\n&quot;)<\/p>\n<p>button = tk.Button(root, text=&quot;\u62bd\u5956&quot;, command=draw_winner)<\/p>\n<p>button.pack(pady=20)<\/p>\n<p>root.mainloop()<\/p>\n<h2><strong>\u5173\u95ed\u6570\u636e\u5e93\u8fde\u63a5<\/strong><\/h2>\n<p>conn.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Python\u5b9e\u73b0\u4e00\u4e2a\u7b80\u5355\u7684\u62bd\u5956\u8f6f\u4ef6\u3002<strong>\u9996\u5148\u5229\u7528random\u6a21\u5757\u751f\u6210\u968f\u673a\u6570\uff0c\u786e\u4fdd\u62bd\u5956\u7684\u968f\u673a\u6027\uff1b\u7136\u540e\u4f7f\u7528\u5b57\u5178\u3001CSV\u6587\u4ef6\u6216SQLite\u6570\u636e\u5e93\u5b58\u50a8\u53c2\u4e0e\u8005\u4fe1\u606f\uff1b\u6700\u540e\u5229\u7528tkinter\u5e93\u8bbe\u8ba1\u56fe\u5f62\u7528\u6237\u754c\u9762<\/strong>\u3002\u6b64\u5916\uff0c\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u529f\u80fd\u6269\u5c55\u6765\u6ee1\u8db3\u4e0d\u540c\u9700\u6c42\uff0c\u5982\u591a\u6b21\u62bd\u5956\u3001\u5b58\u50a8\u62bd\u5956\u8bb0\u5f55\u548c\u7ba1\u7406\u53c2\u4e0e\u8005\u4fe1\u606f\u7b49\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u591f\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7406\u89e3\u5982\u4f55\u4f7f\u7528Python\u7f16\u5199\u62bd\u5956\u8f6f\u4ef6\uff0c\u5e76\u4e3a\u4f60\u63d0\u4f9b\u4e00\u4e9b\u5b9e\u7528\u7684\u53c2\u8003\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>1. \u62bd\u5956\u8f6f\u4ef6\u9700\u8981\u54ea\u4e9b\u57fa\u672c\u529f\u80fd\uff1f<\/strong><br \/>\u62bd\u5956\u8f6f\u4ef6\u901a\u5e38\u5e94\u5177\u5907\u4ee5\u4e0b\u57fa\u672c\u529f\u80fd\uff1a\u7528\u6237\u8f93\u5165\u53c2\u4e0e\u8005\u540d\u5355\u3001\u968f\u673a\u62bd\u53d6\u83b7\u5956\u8005\u3001\u663e\u793a\u83b7\u5956\u4fe1\u606f\u3001\u63d0\u4f9b\u7ed3\u679c\u5bfc\u51fa\u529f\u80fd\uff08\u5982\u5bfc\u51fa\u4e3aExcel\u6216PDF\u6587\u4ef6\uff09\uff0c\u4ee5\u53ca\u8bbe\u7f6e\u62bd\u5956\u89c4\u5219\uff08\u5982\u6bcf\u4eba\u53ef\u4ee5\u62bd\u5956\u7684\u6b21\u6570\u3001\u5956\u54c1\u8bbe\u7f6e\u7b49\uff09\u3002\u6b64\u5916\uff0c\u754c\u9762\u53cb\u597d\u548c\u6613\u4e8e\u64cd\u4f5c\u4e5f\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002<\/p>\n<p><strong>2. \u4f7f\u7528Python\u7684\u54ea\u4e9b\u5e93\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u62bd\u5956\u8f6f\u4ef6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u6709\u51e0\u4e2a\u5e93\u53ef\u4ee5\u5e2e\u52a9\u60a8\u5f00\u53d1\u62bd\u5956\u8f6f\u4ef6\u3002<code>random<\/code>\u5e93\u53ef\u4ee5\u7528\u6765\u751f\u6210\u968f\u673a\u6570\uff0c\u4ece\u800c\u5b9e\u73b0\u968f\u673a\u62bd\u5956\u529f\u80fd\u3002<code>tkinter<\/code>\u5e93\u5219\u53ef\u4ee5\u7528\u4e8e\u521b\u5efa\u56fe\u5f62\u7528\u6237\u754c\u9762\uff0c\u4f7f\u8f6f\u4ef6\u66f4\u6613\u4e8e\u4f7f\u7528\u3002\u6b64\u5916\uff0c<code>pandas<\/code>\u5e93\u53ef\u4ee5\u5e2e\u52a9\u60a8\u5904\u7406\u548c\u5bfc\u51fa\u53c2\u4e0e\u8005\u6570\u636e\uff0c\u975e\u5e38\u9002\u5408\u9700\u8981\u6570\u636e\u7ba1\u7406\u7684\u62bd\u5956\u8f6f\u4ef6\u3002<\/p>\n<p><strong>3. \u5982\u4f55\u4fdd\u8bc1\u62bd\u5956\u8fc7\u7a0b\u7684\u516c\u6b63\u6027\uff1f<\/strong><br \/>\u786e\u4fdd\u62bd\u5956\u8fc7\u7a0b\u7684\u516c\u6b63\u6027\u975e\u5e38\u91cd\u8981\u3002\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u63aa\u65bd\uff1a\u4f7f\u7528\u7ecf\u8fc7\u9a8c\u8bc1\u7684\u968f\u673a\u6570\u751f\u6210\u7b97\u6cd5\uff0c\u786e\u4fdd\u6bcf\u4e2a\u53c2\u4e0e\u8005\u7684\u62bd\u5956\u673a\u4f1a\u76f8\u540c\uff1b\u5728\u62bd\u5956\u524d\u6e05\u6670\u5730\u8bf4\u660e\u62bd\u5956\u89c4\u5219\uff1b\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e73\u53f0\u6216\u5de5\u5177\u6765\u8fdb\u884c\u62bd\u5956\uff0c\u589e\u52a0\u900f\u660e\u5ea6\u3002\u8bb0\u5f55\u62bd\u5956\u8fc7\u7a0b\u7684\u89c6\u9891\u6216\u622a\u56fe\u4e5f\u662f\u4e00\u79cd\u6709\u6548\u7684\u65b9\u5f0f\uff0c\u53ef\u4ee5\u8ba9\u53c2\u4e0e\u8005\u4fe1\u670d\u7ed3\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5982\u4f55\u505a\u62bd\u5956\u8f6f\u4ef6 \u4f7f\u7528Python\u7f16\u5199\u62bd\u5956\u8f6f\u4ef6\uff0c\u9700\u8981\u4f7f\u7528\u968f\u673a\u6570\u751f\u6210\u3001\u6570\u636e\u5b58\u50a8\u3001\u754c\u9762\u8bbe\u8ba1\u7b49\u6280\u672f\u3002 \u9996\u5148 [&hellip;]","protected":false},"author":3,"featured_media":1177319,"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\/1177313"}],"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=1177313"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1177313\/revisions"}],"predecessor-version":[{"id":1177321,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1177313\/revisions\/1177321"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1177319"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1177313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1177313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1177313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}