{"id":987198,"date":"2024-12-27T07:51:26","date_gmt":"2024-12-26T23:51:26","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/987198.html"},"modified":"2024-12-27T07:51:29","modified_gmt":"2024-12-26T23:51:29","slug":"python%e5%a6%82%e4%bd%95%e6%8f%90%e5%8f%96%e6%96%87%e6%9c%ac%e4%bf%a1%e6%81%af","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/987198.html","title":{"rendered":"python\u5982\u4f55\u63d0\u53d6\u6587\u672c\u4fe1\u606f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25063419\/0176e17e-064a-43ea-9a47-88f4a74301e4.webp\" alt=\"python\u5982\u4f55\u63d0\u53d6\u6587\u672c\u4fe1\u606f\" \/><\/p>\n<p><p> <strong>Python\u63d0\u53d6\u6587\u672c\u4fe1\u606f\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u81ea\u7136\u8bed\u8a00\u5904\u7406\u5e93\u3001\u6587\u672c\u6316\u6398\u5de5\u5177\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5\u7b49\u3002\u901a\u8fc7\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u53ef\u4ee5\u9ad8\u6548\u5730\u5339\u914d\u548c\u63d0\u53d6\u7279\u5b9a\u683c\u5f0f\u7684\u6587\u672c\uff1b\u81ea\u7136\u8bed\u8a00\u5904\u7406\u5e93\u5982NLTK\u548cspaCy\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u6765\u89e3\u6790\u548c\u5206\u6790\u6587\u672c\uff1b\u6587\u672c\u6316\u6398\u5de5\u5177\u5982BeautifulSoup\u548cScrapy\u53ef\u4ee5\u7528\u4e8e\u4ece\u7f51\u9875\u4e2d\u63d0\u53d6\u4fe1\u606f\uff1b\u5185\u7f6e\u7684\u5b57\u7b26\u4e32\u65b9\u6cd5\u5219\u53ef\u4ee5\u7528\u4e8e\u7b80\u5355\u7684\u6587\u672c\u5904\u7406\u3002\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u6587\u672c\u63d0\u53d6\u662f\u5176\u4e2d\u4e00\u4e2a\u8f83\u4e3a\u5e38\u89c1\u7684\u65b9\u6cd5\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u7075\u6d3b\u5730\u5b9a\u4e49\u5339\u914d\u6a21\u5f0f\uff0c\u5e76\u4e14\u5728\u5904\u7406\u7ed3\u6784\u5316\u6587\u672c\u65f6\u975e\u5e38\u9ad8\u6548\u3002<\/strong><\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u6587\u672c<\/h3>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\uff08Regular Expressions\uff09\u662f\u5904\u7406\u6587\u672c\u7684\u5f3a\u5927\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u67e5\u627e\u3001\u63d0\u53d6\u548c\u64cd\u4f5c\u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u5b9a\u6a21\u5f0f\u3002Python\u7684<code>re<\/code>\u5e93\u63d0\u4f9b\u4e86\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u652f\u6301\u3002<\/p>\n<\/p>\n<p><h4>1.1 \u6b63\u5219\u8868\u8fbe\u5f0f\u57fa\u7840<\/h4>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u4f7f\u7528\u7279\u5b9a\u7684\u8bed\u6cd5\u6765\u5339\u914d\u5b57\u7b26\u4e32\u4e2d\u7684\u6a21\u5f0f\u3002\u5e38\u89c1\u7684\u7b26\u53f7\u5305\u62ec\uff1a<\/p>\n<\/p>\n<ul>\n<li><code>.<\/code>\uff1a\u5339\u914d\u4efb\u610f\u5355\u4e2a\u5b57\u7b26\u3002<\/li>\n<li><code>*<\/code>\uff1a\u5339\u914d\u524d\u4e00\u4e2a\u5b57\u7b260\u6b21\u6216\u591a\u6b21\u3002<\/li>\n<li><code>+<\/code>\uff1a\u5339\u914d\u524d\u4e00\u4e2a\u5b57\u7b261\u6b21\u6216\u591a\u6b21\u3002<\/li>\n<li><code>?<\/code>\uff1a\u5339\u914d\u524d\u4e00\u4e2a\u5b57\u7b260\u6b21\u62161\u6b21\u3002<\/li>\n<li><code>[]<\/code>\uff1a\u5339\u914d\u62ec\u53f7\u5185\u7684\u4efb\u610f\u5b57\u7b26\u3002<\/li>\n<li><code>^<\/code>\uff1a\u5339\u914d\u5b57\u7b26\u4e32\u7684\u5f00\u5934\u3002<\/li>\n<li><code>$<\/code>\uff1a\u5339\u914d\u5b57\u7b26\u4e32\u7684\u7ed3\u5c3e\u3002<\/li>\n<\/ul>\n<p><h4>1.2 \u4f7f\u7528re\u5e93\u8fdb\u884c\u6587\u672c\u63d0\u53d6<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528Python\u7684<code>re<\/code>\u5e93\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u6587\u672c\u7684\u5339\u914d\u548c\u63d0\u53d6\u3002\u4f8b\u5982\uff0c\u4ece\u4e00\u4e2a\u53e5\u5b50\u4e2d\u63d0\u53d6\u6240\u6709\u7684\u6570\u5b57\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>text = &quot;The price is 100 dollars and the discount is 20 dollars.&quot;<\/p>\n<p>numbers = re.findall(r&#39;\\d+&#39;, text)<\/p>\n<p>print(numbers)  # \u8f93\u51fa\uff1a[&#39;100&#39;, &#39;20&#39;]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u81ea\u7136\u8bed\u8a00\u5904\u7406\u5e93<\/h3>\n<\/p>\n<p><p>\u81ea\u7136\u8bed\u8a00\u5904\u7406\uff08NLP\uff09\u5e93\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u7684\u6587\u672c\u5206\u6790\u529f\u80fd\uff0c\u5305\u62ec\u8bcd\u6027\u6807\u6ce8\u3001\u53e5\u6cd5\u5206\u6790\u3001\u5b9e\u4f53\u8bc6\u522b\u7b49\u3002Python\u4e2d\u5e38\u7528\u7684NLP\u5e93\u6709NLTK\u548cspaCy\u3002<\/p>\n<\/p>\n<p><h4>2.1 \u4f7f\u7528NLTK\u8fdb\u884c\u6587\u672c\u5206\u6790<\/h4>\n<\/p>\n<p><p>NLTK\uff08Natural Language Toolkit\uff09\u662f\u4e00\u4e2a\u5f3a\u5927\u7684NLP\u5e93\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u6587\u672c\u5904\u7406\u5de5\u5177\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import nltk<\/p>\n<p>from nltk.tokenize import word_tokenize<\/p>\n<p>nltk.download(&#39;punkt&#39;)<\/p>\n<p>text = &quot;Python is a powerful programming language.&quot;<\/p>\n<p>tokens = word_tokenize(text)<\/p>\n<p>print(tokens)  # \u8f93\u51fa\uff1a[&#39;Python&#39;, &#39;is&#39;, &#39;a&#39;, &#39;powerful&#39;, &#39;programming&#39;, &#39;language&#39;, &#39;.&#39;]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2.2 \u4f7f\u7528spaCy\u8fdb\u884c\u6587\u672c\u5206\u6790<\/h4>\n<\/p>\n<p><p>spaCy\u662f\u53e6\u4e00\u4e2a\u6d41\u884c\u7684NLP\u5e93\uff0c\u5177\u6709\u9ad8\u6548\u7684\u6587\u672c\u5904\u7406\u80fd\u529b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import spacy<\/p>\n<p>nlp = spacy.load(&quot;en_core_web_sm&quot;)<\/p>\n<p>text = &quot;Python is a powerful programming language.&quot;<\/p>\n<p>doc = nlp(text)<\/p>\n<p>for token in doc:<\/p>\n<p>    print(token.text, token.pos_)  # \u8f93\u51fa\u8bcd\u548c\u8bcd\u6027<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u6587\u672c\u6316\u6398\u5de5\u5177<\/h3>\n<\/p>\n<p><p>\u6587\u672c\u6316\u6398\u5de5\u5177\u53ef\u7528\u4e8e\u4ece\u7f51\u9875\u6216\u5176\u4ed6\u6570\u636e\u6e90\u4e2d\u63d0\u53d6\u6587\u672c\u4fe1\u606f\u3002\u5e38\u7528\u7684\u5de5\u5177\u6709BeautifulSoup\u548cScrapy\u3002<\/p>\n<\/p>\n<p><h4>3.1 \u4f7f\u7528BeautifulSoup\u63d0\u53d6\u7f51\u9875\u6587\u672c<\/h4>\n<\/p>\n<p><p>BeautifulSoup\u7528\u4e8e\u89e3\u6790HTML\u548cXML\u6587\u6863\uff0c\u5e76\u63d0\u53d6\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bs4 import BeautifulSoup<\/p>\n<p>import requests<\/p>\n<p>url = &quot;http:\/\/example.com&quot;<\/p>\n<p>response = requests.get(url)<\/p>\n<p>soup = BeautifulSoup(response.text, &#39;html.parser&#39;)<\/p>\n<h2><strong>\u63d0\u53d6\u6240\u6709\u6bb5\u843d\u7684\u6587\u672c<\/strong><\/h2>\n<p>paragraphs = soup.find_all(&#39;p&#39;)<\/p>\n<p>for para in paragraphs:<\/p>\n<p>    print(para.get_text())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3.2 \u4f7f\u7528Scrapy\u8fdb\u884c\u6570\u636e\u722c\u53d6<\/h4>\n<\/p>\n<p><p>Scrapy\u662f\u4e00\u4e2a\u7528\u4e8e\u6293\u53d6\u7f51\u9875\u6570\u636e\u7684\u5f00\u6e90\u6846\u67b6\uff0c\u9002\u5408\u5927\u89c4\u6a21\u6570\u636e\u63d0\u53d6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import scrapy<\/p>\n<p>class MySpider(scrapy.Spider):<\/p>\n<p>    name = &#39;my_spider&#39;<\/p>\n<p>    start_urls = [&#39;http:\/\/example.com&#39;]<\/p>\n<p>    def parse(self, response):<\/p>\n<p>        for text in response.css(&#39;p::text&#39;).getall():<\/p>\n<p>            yield {&#39;text&#39;: text}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5\u8fdb\u884c\u7b80\u5355\u6587\u672c\u5904\u7406<\/h3>\n<\/p>\n<p><p>Python\u7684\u5185\u7f6e\u5b57\u7b26\u4e32\u65b9\u6cd5\u53ef\u4ee5\u7528\u4e8e\u6267\u884c\u7b80\u5355\u7684\u6587\u672c\u64cd\u4f5c\uff0c\u5982\u5206\u5272\u3001\u66ff\u6362\u548c\u67e5\u627e\u3002<\/p>\n<\/p>\n<p><h4>4.1 \u4f7f\u7528\u5b57\u7b26\u4e32\u65b9\u6cd5\u5206\u5272\u548c\u66ff\u6362\u6587\u672c<\/h4>\n<\/p>\n<p><p>\u5b57\u7b26\u4e32\u65b9\u6cd5\u53ef\u4ee5\u65b9\u4fbf\u5730\u5904\u7406\u7b80\u5355\u7684\u6587\u672c\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text = &quot;Python is great, and Python is versatile.&quot;<\/p>\n<h2><strong>\u5206\u5272\u5b57\u7b26\u4e32<\/strong><\/h2>\n<p>words = text.split()<\/p>\n<p>print(words)  # \u8f93\u51fa\uff1a[&#39;Python&#39;, &#39;is&#39;, &#39;great,&#39;, &#39;and&#39;, &#39;Python&#39;, &#39;is&#39;, &#39;versatile.&#39;]<\/p>\n<h2><strong>\u66ff\u6362\u6587\u672c<\/strong><\/h2>\n<p>new_text = text.replace(&quot;Python&quot;, &quot;Java&quot;)<\/p>\n<p>print(new_text)  # \u8f93\u51fa\uff1aJava is great, and Java is versatile.<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u8fdb\u884c\u590d\u6742\u6587\u672c\u63d0\u53d6<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5355\u4e00\u65b9\u6cd5\u53ef\u80fd\u65e0\u6cd5\u6ee1\u8db3\u590d\u6742\u7684\u6587\u672c\u63d0\u53d6\u9700\u6c42\u3002\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5b9e\u73b0\u66f4\u5f3a\u5927\u7684\u6587\u672c\u5904\u7406\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h4>5.1 \u7efc\u5408\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u548cNLP<\/h4>\n<\/p>\n<p><p>\u5728\u5904\u7406\u590d\u6742\u7684\u6587\u672c\u65f6\uff0c\u53ef\u4ee5\u7ed3\u5408\u6b63\u5219\u8868\u8fbe\u5f0f\u548cNLP\u6280\u672f\u3002\u4f8b\u5982\uff0c\u63d0\u53d6\u5305\u542b\u7279\u5b9a\u5b9e\u4f53\u7684\u53e5\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>import spacy<\/p>\n<p>nlp = spacy.load(&quot;en_core_web_sm&quot;)<\/p>\n<p>text = &quot;Google was founded by Larry Page and Sergey Brin.&quot;<\/p>\n<h2><strong>\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d\u53e5\u5b50<\/strong><\/h2>\n<p>sentences = re.findall(r&#39;[^.]*Google[^.]*\\.&#39;, text)<\/p>\n<p>for sentence in sentences:<\/p>\n<p>    doc = nlp(sentence)<\/p>\n<p>    for ent in doc.ents:<\/p>\n<p>        if ent.label_ == &#39;PERSON&#39;:<\/p>\n<p>            print(ent.text)  # \u8f93\u51fa\uff1aLarry Page, Sergey Brin<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u6587\u672c\u63d0\u53d6\u5e94\u7528\u6848\u4f8b<\/h3>\n<\/p>\n<p><p>\u6587\u672c\u63d0\u53d6\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u6709\u5e7f\u6cdb\u7684\u7528\u9014\uff0c\u5982\u4fe1\u606f\u68c0\u7d22\u3001\u81ea\u52a8\u6458\u8981\u751f\u6210\u548c\u60c5\u611f\u5206\u6790\u7b49\u3002<\/p>\n<\/p>\n<p><h4>6.1 \u4fe1\u606f\u68c0\u7d22<\/h4>\n<\/p>\n<p><p>\u4fe1\u606f\u68c0\u7d22\u7cfb\u7edf\u53ef\u4ee5\u4ece\u5927\u91cf\u6587\u672c\u4e2d\u63d0\u53d6\u6709\u7528\u7684\u4fe1\u606f\uff0c\u4ee5\u652f\u6301\u51b3\u7b56\u548c\u5206\u6790\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def search_keyword(text, keyword):<\/p>\n<p>    sentences = text.split(&#39;.&#39;)<\/p>\n<p>    for sentence in sentences:<\/p>\n<p>        if keyword.lower() in sentence.lower():<\/p>\n<p>            print(sentence.strip())<\/p>\n<p>article = &quot;Python is great for data science. Python is also used for web development.&quot;<\/p>\n<p>search_keyword(article, &quot;data science&quot;)  # \u8f93\u51fa\uff1aPython is great for data science.<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>6.2 \u81ea\u52a8\u6458\u8981\u751f\u6210<\/h4>\n<\/p>\n<p><p>\u81ea\u52a8\u6458\u8981\u751f\u6210\u53ef\u4ee5\u4ece\u957f\u6587\u6863\u4e2d\u63d0\u53d6\u5173\u952e\u4fe1\u606f\uff0c\u4e3a\u8bfb\u8005\u63d0\u4f9b\u5feb\u901f\u6982\u89c8\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from gensim.summarization import summarize<\/p>\n<p>text = &quot;&quot;&quot;Python is an interpreted high-level general-purpose programming language. <\/p>\n<p>Its design philosophy emphasizes code readability with the use of significant indentation. <\/p>\n<p>Its language constructs as well as its object-oriented approach <a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>m to help programmers write clear, logical code for small and large-scale projects.&quot;&quot;&quot;<\/p>\n<p>summary = summarize(text, ratio=0.5)<\/p>\n<p>print(summary)  # \u8f93\u51fa\uff1a\u81ea\u52a8\u751f\u6210\u7684\u6458\u8981<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\u548c\u5de5\u5177\uff0cPython\u53ef\u4ee5\u9ad8\u6548\u5730\u63d0\u53d6\u548c\u5904\u7406\u6587\u672c\u4fe1\u606f\uff0c\u6ee1\u8db3\u4e0d\u540c\u7684\u5e94\u7528\u9700\u6c42\u3002\u5728\u5177\u4f53\u9879\u76ee\u4e2d\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u548c\u5de5\u5177\uff0c\u7ed3\u5408\u591a\u79cd\u6280\u672f\uff0c\u5c06\u6709\u52a9\u4e8e\u5b9e\u73b0\u66f4\u4e3a\u590d\u6742\u548c\u667a\u80fd\u7684\u6587\u672c\u5904\u7406\u529f\u80fd\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u63d0\u53d6\u7279\u5b9a\u683c\u5f0f\u7684\u6587\u672c\u4fe1\u606f\uff1f<\/strong><br \/>Python\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u63d0\u53d6\u7279\u5b9a\u683c\u5f0f\u7684\u6587\u672c\u4fe1\u606f\uff0c\u6700\u5e38\u7528\u7684\u5305\u62ec\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5\u548c\u7b2c\u4e09\u65b9\u5e93\uff08\u5982BeautifulSoup\u548cpandas\uff09\u3002\u6b63\u5219\u8868\u8fbe\u5f0f\u975e\u5e38\u9002\u5408\u5904\u7406\u590d\u6742\u7684\u5339\u914d\u6a21\u5f0f\uff0c\u5b57\u7b26\u4e32\u65b9\u6cd5\u5219\u9002\u5408\u7b80\u5355\u7684\u6587\u672c\u5904\u7406\u3002\u800cBeautifulSoup\u53ef\u4ee5\u5e2e\u52a9\u89e3\u6790HTML\u548cXML\u6587\u6863\uff0c\u63d0\u53d6\u6240\u9700\u7684\u4fe1\u606f\uff0cpandas\u5219\u5728\u5904\u7406\u8868\u683c\u6570\u636e\u65f6\u8868\u73b0\u4f18\u5f02\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u63d0\u53d6\u6587\u672c\u4fe1\u606f\u65f6\uff0c\u6709\u54ea\u4e9b\u5e38\u7528\u7684\u5e93\uff1f<\/strong><br \/>\u5728\u63d0\u53d6\u6587\u672c\u4fe1\u606f\u65f6\uff0c\u5e38\u7528\u7684\u5e93\u5305\u62ecre\uff08\u7528\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f\u64cd\u4f5c\uff09\u3001BeautifulSoup\uff08\u7528\u4e8e\u89e3\u6790HTML\u548cXML\uff09\u3001requests\uff08\u7528\u4e8e\u7f51\u7edc\u8bf7\u6c42\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\uff09\u4ee5\u53capandas\uff08\u7528\u4e8e\u5904\u7406\u6570\u636e\u8868\u683c\uff09\u3002\u8fd9\u4e9b\u5e93\u5404\u6709\u7279\u70b9\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u8fdb\u884c\u6587\u672c\u63d0\u53d6\u3002<\/p>\n<p><strong>\u5982\u4f55\u63d0\u9ad8\u6587\u672c\u4fe1\u606f\u63d0\u53d6\u7684\u6548\u7387\u548c\u51c6\u786e\u6027\uff1f<\/strong><br \/>\u63d0\u9ad8\u6587\u672c\u4fe1\u606f\u63d0\u53d6\u7684\u6548\u7387\u548c\u51c6\u786e\u6027\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\u3002\u5408\u7406\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u7cbe\u51c6\u5339\u914d\uff0c\u4f18\u5316\u4ee3\u7801\u4ee5\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u5faa\u73af\uff0c\u4f7f\u7528\u591a\u7ebf\u7a0b\u6216\u5f02\u6b65\u8bf7\u6c42\u6765\u52a0\u901f\u6570\u636e\u6293\u53d6\u3002\u6b64\u5916\uff0c\u4fdd\u6301\u6570\u636e\u6e05\u6d17\u548c\u9884\u5904\u7406\u7684\u6b65\u9aa4\uff0c\u4ee5\u786e\u4fdd\u63d0\u53d6\u51fa\u7684\u4fe1\u606f\u51c6\u786e\u65e0\u8bef\u3002\u9488\u5bf9\u7279\u5b9a\u683c\u5f0f\u7684\u6587\u672c\uff0c\u53ef\u4ee5\u8003\u8651\u5efa\u7acb\u6a21\u677f\u6765\u52a0\u901f\u63d0\u53d6\u8fc7\u7a0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u63d0\u53d6\u6587\u672c\u4fe1\u606f\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u81ea\u7136\u8bed\u8a00\u5904\u7406\u5e93\u3001\u6587\u672c\u6316\u6398\u5de5\u5177\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5\u7b49\u3002\u901a\u8fc7\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c [&hellip;]","protected":false},"author":3,"featured_media":987209,"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\/987198"}],"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=987198"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/987198\/revisions"}],"predecessor-version":[{"id":987212,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/987198\/revisions\/987212"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/987209"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=987198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=987198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=987198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}