{"id":1150033,"date":"2025-01-13T16:56:50","date_gmt":"2025-01-13T08:56:50","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1150033.html"},"modified":"2025-01-13T16:56:52","modified_gmt":"2025-01-13T08:56:52","slug":"python%e5%a6%82%e4%bd%95%e5%88%a4%e6%96%adabc%e5%a4%a7%e5%b0%8f","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1150033.html","title":{"rendered":"python\u5982\u4f55\u5224\u65adabc\u5927\u5c0f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25180620\/6f79b7f4-bbab-46ef-965a-b4ebb5f15426.webp\" alt=\"python\u5982\u4f55\u5224\u65adabc\u5927\u5c0f\" \/><\/p>\n<p><p> <strong>Python\u5224\u65adabc\u5927\u5c0f\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528ord()\u51fd\u6570\u3001\u4f7f\u7528\u5b57\u7b26\u4e32\u7684\u6bd4\u8f83\u8fd0\u7b97\u7b26\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570isupper()\u548cislower()\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u3002<\/strong> \u5176\u4e2d\uff0c\u4f7f\u7528\u5b57\u7b26\u4e32\u7684\u6bd4\u8f83\u8fd0\u7b97\u7b26\u662f\u6700\u4e3a\u76f4\u63a5\u548c\u5e38\u7528\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u5b57\u7b26\u4e32\u7684\u6bd4\u8f83\u8fd0\u7b97\u7b26\u53ef\u4ee5\u76f4\u63a5\u6bd4\u8f83\u4e24\u4e2a\u5b57\u7b26\u4e32\u7684\u5927\u5c0f\u3002Python\u4e2d\u7684\u5b57\u7b26\u4e32\u6bd4\u8f83\u662f\u57fa\u4e8e\u5b57\u6bcd\u7684ASCII\u503c\u8fdb\u884c\u7684\u3002\u5f53\u4f60\u6bd4\u8f83\u4e24\u4e2a\u5b57\u7b26\u4e32\u65f6\uff0cPython\u4f1a\u9010\u4e2a\u5b57\u7b26\u5730\u6bd4\u8f83\u5b83\u4eec\u7684ASCII\u503c\uff0c\u76f4\u5230\u627e\u5230\u4e0d\u540c\u7684\u5b57\u7b26\u4e3a\u6b62\u3002\u4e3e\u4e2a\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if &#39;a&#39; &lt; &#39;b&#39; &lt; &#39;c&#39;:<\/p>\n<p>    print(&#39;abc \u662f\u6309\u987a\u5e8f\u6392\u5217\u7684&#39;)<\/p>\n<p>else:<\/p>\n<p>    print(&#39;abc \u4e0d\u662f\u6309\u987a\u5e8f\u6392\u5217\u7684&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u9762\u7684\u4ee3\u7801\u4f1a\u8f93\u51fa\u201cabc \u662f\u6309\u987a\u5e8f\u6392\u5217\u7684\u201d\uff0c\u56e0\u4e3a\u5728ASCII\u8868\u4e2d\uff0c&#39;a&#39;\u7684\u503c\u662f97\uff0c&#39;b&#39;\u7684\u503c\u662f98\uff0c&#39;c&#39;\u7684\u503c\u662f99\u3002<\/p>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u51e0\u79cd\u65b9\u6cd5\uff0c\u5e76\u89e3\u91ca\u5b83\u4eec\u5982\u4f55\u5728\u4e0d\u540c\u573a\u666f\u4e0b\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u4f7f\u7528ord()\u51fd\u6570<\/h2>\n<\/p>\n<p><p>ord()\u51fd\u6570\u53ef\u4ee5\u8fd4\u56de\u4e00\u4e2a\u5b57\u7b26\u7684ASCII\u503c\uff0c\u8fd9\u6837\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u6bd4\u8f83ASCII\u503c\u6765\u5224\u65ad\u5b57\u7b26\u7684\u5927\u5c0f\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if ord(&#39;a&#39;) &lt; ord(&#39;b&#39;) &lt; ord(&#39;c&#39;):<\/p>\n<p>    print(&#39;abc \u662f\u6309\u987a\u5e8f\u6392\u5217\u7684&#39;)<\/p>\n<p>else:<\/p>\n<p>    print(&#39;abc \u4e0d\u662f\u6309\u987a\u5e8f\u6392\u5217\u7684&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528ord()\u51fd\u6570\u5206\u522b\u83b7\u5f97&#39;a&#39;\u3001&#39;b&#39;\u548c&#39;c&#39;\u7684ASCII\u503c\uff0c\u5e76\u8fdb\u884c\u6bd4\u8f83\u3002<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u5355\u4e2a\u5b57\u7b26\u7684\u6bd4\u8f83\uff0cord()\u51fd\u6570\u8fd8\u53ef\u4ee5\u7528\u6765\u6bd4\u8f83\u4e24\u4e2a\u5b57\u7b26\u4e32\u7684\u5927\u5c0f\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5faa\u73af\u6765\u904d\u5386\u6bcf\u4e2a\u5b57\u7b26\uff0c\u5e76\u9010\u4e2a\u6bd4\u8f83\u5b83\u4eec\u7684ASCII\u503c\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def compare_strings(s1, s2):<\/p>\n<p>    for c1, c2 in zip(s1, s2):<\/p>\n<p>        if ord(c1) != ord(c2):<\/p>\n<p>            return ord(c1) - ord(c2)<\/p>\n<p>    return len(s1) - len(s2)<\/p>\n<p>result = compare_strings(&#39;abc&#39;, &#39;abd&#39;)<\/p>\n<p>if result &lt; 0:<\/p>\n<p>    print(&#39;abc \u5c0f\u4e8e abd&#39;)<\/p>\n<p>elif result &gt; 0:<\/p>\n<p>    print(&#39;abc \u5927\u4e8e abd&#39;)<\/p>\n<p>else:<\/p>\n<p>    print(&#39;abc \u7b49\u4e8e abd&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2acompare_strings()\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u4f7f\u7528ord()\u51fd\u6570\u9010\u4e2a\u6bd4\u8f83\u4e24\u4e2a\u5b57\u7b26\u4e32\u4e2d\u7684\u5b57\u7b26\uff0c\u76f4\u5230\u627e\u5230\u4e0d\u540c\u7684\u5b57\u7b26\u6216\u904d\u5386\u5b8c\u6574\u4e2a\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><h2>\u4e8c\u3001\u4f7f\u7528\u5b57\u7b26\u4e32\u7684\u6bd4\u8f83\u8fd0\u7b97\u7b26<\/h2>\n<\/p>\n<p><p>Python\u652f\u6301\u5b57\u7b26\u4e32\u7684\u6bd4\u8f83\u8fd0\u7b97\u7b26\uff08\u5982&lt;\u3001&gt;\u3001&lt;=\u3001&gt;=\u3001==\u548c!=\uff09\uff0c\u8fd9\u4e9b\u8fd0\u7b97\u7b26\u53ef\u4ee5\u76f4\u63a5\u6bd4\u8f83\u4e24\u4e2a\u5b57\u7b26\u4e32\u7684\u5927\u5c0f\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if &#39;a&#39; &lt; &#39;b&#39; &lt; &#39;c&#39;:<\/p>\n<p>    print(&#39;abc \u662f\u6309\u987a\u5e8f\u6392\u5217\u7684&#39;)<\/p>\n<p>else:<\/p>\n<p>    print(&#39;abc \u4e0d\u662f\u6309\u987a\u5e8f\u6392\u5217\u7684&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b57\u7b26\u4e32\u7684\u6bd4\u8f83\u8fd0\u7b97\u7b26\u57fa\u4e8e\u5b57\u7b26\u7684ASCII\u503c\u8fdb\u884c\u6bd4\u8f83\uff0c\u8fd9\u4f7f\u5f97\u5b83\u4eec\u975e\u5e38\u9002\u5408\u6bd4\u8f83\u5b57\u6bcd\u548c\u5176\u4ed6\u5b57\u7b26\u3002<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u5355\u4e2a\u5b57\u7b26\u7684\u6bd4\u8f83\uff0c\u5b57\u7b26\u4e32\u7684\u6bd4\u8f83\u8fd0\u7b97\u7b26\u4e5f\u53ef\u4ee5\u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u5b57\u7b26\u4e32\u7684\u5927\u5c0f\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if &#39;abc&#39; &lt; &#39;abd&#39;:<\/p>\n<p>    print(&#39;abc \u5c0f\u4e8e abd&#39;)<\/p>\n<p>elif &#39;abc&#39; &gt; &#39;abd&#39;:<\/p>\n<p>    print(&#39;abc \u5927\u4e8e abd&#39;)<\/p>\n<p>else:<\/p>\n<p>    print(&#39;abc \u7b49\u4e8e abd&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c&#39;abc&#39;\u548c&#39;abd&#39;\u5206\u522b\u6309\u5b57\u6bcd\u987a\u5e8f\u8fdb\u884c\u6bd4\u8f83\uff0c\u7ed3\u679c\u8868\u660e&#39;abc&#39;\u5c0f\u4e8e&#39;abd&#39;\u3002<\/p>\n<\/p>\n<p><h2>\u4e09\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570isupper()\u548cislower()<\/h2>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u4e24\u4e2a\u5185\u7f6e\u51fd\u6570isupper()\u548cislower()\uff0c\u53ef\u4ee5\u7528\u4e8e\u5224\u65ad\u4e00\u4e2a\u5b57\u7b26\u662f\u5426\u4e3a\u5927\u5199\u5b57\u6bcd\u6216\u5c0f\u5199\u5b57\u6bcd\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if &#39;a&#39;.islower() and &#39;b&#39;.islower() and &#39;c&#39;.islower():<\/p>\n<p>    print(&#39;abc \u5168\u662f\u5c0f\u5199\u5b57\u6bcd&#39;)<\/p>\n<p>else:<\/p>\n<p>    print(&#39;abc \u4e0d\u662f\u5168\u5c0f\u5199\u5b57\u6bcd&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528islower()\u51fd\u6570\u5224\u65ad&#39;a&#39;\u3001&#39;b&#39;\u548c&#39;c&#39;\u662f\u5426\u90fd\u662f\u5c0f\u5199\u5b57\u6bcd\u3002<\/p>\n<\/p>\n<p><p>\u540c\u6837\u5730\uff0cisupper()\u51fd\u6570\u53ef\u4ee5\u7528\u4e8e\u5224\u65ad\u4e00\u4e2a\u5b57\u7b26\u662f\u5426\u4e3a\u5927\u5199\u5b57\u6bcd\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if &#39;A&#39;.isupper() and &#39;B&#39;.isupper() and &#39;C&#39;.isupper():<\/p>\n<p>    print(&#39;ABC \u5168\u662f\u5927\u5199\u5b57\u6bcd&#39;)<\/p>\n<p>else:<\/p>\n<p>    print(&#39;ABC \u4e0d\u662f\u5168\u5927\u5199\u5b57\u6bcd&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528isupper()\u51fd\u6570\u5224\u65ad&#39;A&#39;\u3001&#39;B&#39;\u548c&#39;C&#39;\u662f\u5426\u90fd\u662f\u5927\u5199\u5b57\u6bcd\u3002<\/p>\n<\/p>\n<p><h2>\u56db\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f<\/h2>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u6587\u672c\u5339\u914d\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u5224\u65ad\u5b57\u7b26\u4e32\u662f\u5426\u7b26\u5408\u7279\u5b9a\u6a21\u5f0f\u3002Python\u7684re\u6a21\u5757\u63d0\u4f9b\u4e86\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u652f\u6301\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>pattern = re.compile(r&#39;^[a-z]+$&#39;)<\/p>\n<p>if pattern.match(&#39;abc&#39;):<\/p>\n<p>    print(&#39;abc \u5168\u662f\u5c0f\u5199\u5b57\u6bcd&#39;)<\/p>\n<p>else:<\/p>\n<p>    print(&#39;abc \u4e0d\u662f\u5168\u5c0f\u5199\u5b57\u6bcd&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f^[a-z]+$\u6765\u5339\u914d\u662f\u5426\u5168\u662f\u5c0f\u5199\u5b57\u6bcd\u3002<\/p>\n<\/p>\n<p><p>\u540c\u6837\u5730\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5339\u914d\u662f\u5426\u5168\u662f\u5927\u5199\u5b57\u6bcd\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>pattern = re.compile(r&#39;^[A-Z]+$&#39;)<\/p>\n<p>if pattern.match(&#39;ABC&#39;):<\/p>\n<p>    print(&#39;ABC \u5168\u662f\u5927\u5199\u5b57\u6bcd&#39;)<\/p>\n<p>else:<\/p>\n<p>    print(&#39;ABC \u4e0d\u662f\u5168\u5927\u5199\u5b57\u6bcd&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f^[A-Z]+$\u6765\u5339\u914d\u662f\u5426\u5168\u662f\u5927\u5199\u5b57\u6bcd\u3002<\/p>\n<\/p>\n<p><h2>\u4e94\u3001\u603b\u7ed3<\/h2>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u51e0\u79cd\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u5728Python\u4e2d\u8f7b\u677e\u5224\u65ad\u5b57\u7b26\u548c\u5b57\u7b26\u4e32\u7684\u5927\u5c0f\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u7279\u5b9a\u7684\u4f7f\u7528\u573a\u666f\u548c\u4f18\u7f3a\u70b9\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528ord()\u51fd\u6570<\/strong>\uff1a\u9002\u7528\u4e8e\u9700\u8981\u7cbe\u786e\u63a7\u5236\u5b57\u7b26ASCII\u503c\u7684\u6bd4\u8f83\u3002<\/li>\n<li><strong>\u4f7f\u7528\u5b57\u7b26\u4e32\u7684\u6bd4\u8f83\u8fd0\u7b97\u7b26<\/strong>\uff1a\u6700\u4e3a\u76f4\u63a5\u548c\u5e38\u7528\u7684\u65b9\u6cd5\uff0c\u9002\u7528\u4e8e\u4e00\u822c\u7684\u5b57\u7b26\u4e32\u6bd4\u8f83\u3002<\/li>\n<li><strong>\u4f7f\u7528\u5185\u7f6e\u51fd\u6570isupper()\u548cislower()<\/strong>\uff1a\u9002\u7528\u4e8e\u5224\u65ad\u5b57\u7b26\u662f\u5426\u4e3a\u5927\u5199\u6216\u5c0f\u5199\u5b57\u6bcd\u3002<\/li>\n<li><strong>\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f<\/strong>\uff1a\u9002\u7528\u4e8e\u590d\u6742\u7684\u6a21\u5f0f\u5339\u914d\u548c\u5b57\u7b26\u4e32\u9a8c\u8bc1\u3002<\/li>\n<\/ol>\n<p><p>\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u6bd4\u8f83\u5b57\u7b26\u4e32\u7684\u5b57\u6bcd\u987a\u5e8f\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u6bd4\u8f83\u5b57\u7b26\u4e32\u662f\u901a\u8fc7\u5b57\u6bcd\u7684ASCII\u503c\u6765\u8fdb\u884c\u7684\u3002\u53ef\u4ee5\u4f7f\u7528\u6bd4\u8f83\u8fd0\u7b97\u7b26\uff08\u5982<code>&lt;<\/code>, <code>&gt;<\/code>, <code>==<\/code>\u7b49\uff09\u76f4\u63a5\u6bd4\u8f83\u4e24\u4e2a\u5b57\u7b26\u4e32\u3002\u4f8b\u5982\uff0c<code>&#39;abc&#39; &lt; &#39;abd&#39;<\/code> \u8fd4\u56de <code>True<\/code>\uff0c\u56e0\u4e3a\u5728\u5b57\u6bcd\u8868\u4e2d\uff0c&#39;c&#39; \u5728&#39;d&#39;\u4e4b\u524d\u3002\u8fd9\u4e2a\u7279\u6027\u53ef\u4ee5\u7528\u4e8e\u5bf9\u4efb\u610f\u4e24\u4e2a\u5b57\u7b26\u4e32\u8fdb\u884c\u6392\u5e8f\u6216\u6bd4\u8f83\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u5224\u65ad\u5b57\u7b26\u4e32\u662f\u5426\u76f8\u7b49\uff1f<\/strong><br \/>\u5224\u65ad\u4e24\u4e2a\u5b57\u7b26\u4e32\u662f\u5426\u76f8\u7b49\u53ef\u4ee5\u4f7f\u7528<code>==<\/code>\u8fd0\u7b97\u7b26\u3002\u4f8b\u5982\uff0c<code>&#39;abc&#39; == &#39;abc&#39;<\/code> \u8fd4\u56de <code>True<\/code>\uff0c\u800c<code>&#39;abc&#39; == &#39;Abc&#39;<\/code> \u8fd4\u56de <code>False<\/code>\uff0c\u56e0\u4e3aPython\u662f\u533a\u5206\u5927\u5c0f\u5199\u7684\u3002\u5982\u679c\u9700\u8981\u5ffd\u7565\u5927\u5c0f\u5199\uff0c\u53ef\u4ee5\u4f7f\u7528<code>str.lower()<\/code>\u6216<code>str.upper()<\/code>\u65b9\u6cd5\uff0c\u5982<code>&#39;abc&#39;.lower() == &#39;AbC&#39;.lower()<\/code>\u5c06\u8fd4\u56de <code>True<\/code>\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5bf9\u591a\u4e2a\u5b57\u7b26\u4e32\u8fdb\u884c\u6392\u5e8f\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528<code>sorted()<\/code>\u51fd\u6570\u5bf9\u5b57\u7b26\u4e32\u5217\u8868\u8fdb\u884c\u6392\u5e8f\u3002\u8fd9\u4e2a\u51fd\u6570\u4f1a\u6309\u7167\u5b57\u6bcd\u987a\u5e8f\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u5217\u8868\u3002\u4f8b\u5982\uff0c<code>sorted([&#39;abc&#39;, &#39;acb&#39;, &#39;bac&#39;])<\/code> \u5c06\u8fd4\u56de <code>[&#39;abc&#39;, &#39;acb&#39;, &#39;bac&#39;]<\/code>\u3002\u5728\u6392\u5e8f\u65f6\uff0cPython\u4f1a\u9075\u5faaASCII\u503c\u7684\u987a\u5e8f\uff0c\u786e\u4fdd\u5927\u5c0f\u5199\u5b57\u6bcd\u7684\u6392\u5e8f\u6b63\u786e\u3002\u5982\u679c\u9700\u8981\u81ea\u5b9a\u4e49\u6392\u5e8f\u89c4\u5219\uff0c\u53ef\u4ee5\u4f7f\u7528<code>key<\/code>\u53c2\u6570\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5224\u65adabc\u5927\u5c0f\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528ord()\u51fd\u6570\u3001\u4f7f\u7528\u5b57\u7b26\u4e32\u7684\u6bd4\u8f83\u8fd0\u7b97\u7b26\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570isupper() [&hellip;]","protected":false},"author":3,"featured_media":1150036,"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\/1150033"}],"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=1150033"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1150033\/revisions"}],"predecessor-version":[{"id":1150038,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1150033\/revisions\/1150038"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1150036"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1150033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1150033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1150033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}