{"id":1059608,"date":"2024-12-31T15:26:42","date_gmt":"2024-12-31T07:26:42","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1059608.html"},"modified":"2024-12-31T15:26:45","modified_gmt":"2024-12-31T07:26:45","slug":"python%e4%b8%ad%e7%9a%84%e5%ad%97%e7%ac%a6%e4%b8%b2%e5%a6%82%e4%bd%95%e5%a4%a7%e5%86%99","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1059608.html","title":{"rendered":"python\u4e2d\u7684\u5b57\u7b26\u4e32\u5982\u4f55\u5927\u5199"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/24465981-954b-4b47-ba75-ad14a5d691f5.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u4e2d\u7684\u5b57\u7b26\u4e32\u5982\u4f55\u5927\u5199\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u5185\u7f6e\u7684<code>upper()<\/code>\u65b9\u6cd5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5927\u5199\u3002\u5177\u4f53\u65b9\u6cd5\u662f\u8c03\u7528\u5b57\u7b26\u4e32\u5bf9\u8c61\u7684<code>upper()<\/code>\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u4f1a\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u5b57\u7b26\u4e32\uff0c\u5176\u4e2d\u6240\u6709\u7684\u5b57\u6bcd\u90fd\u88ab\u8f6c\u6362\u4e3a\u5927\u5199\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff1a<code>string = &quot;hello world&quot;.upper()<\/code><\/p>\n<\/p>\n<hr>\n<p><h3>\u4e00\u3001\u5b57\u7b26\u4e32\u5927\u5199\u65b9\u6cd5\uff1aupper()<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c<code>upper()<\/code>\u65b9\u6cd5\u662f\u4e00\u4e2a\u975e\u5e38\u7b80\u5355\u4e14\u5e38\u7528\u7684\u5b57\u7b26\u4e32\u65b9\u6cd5\u3002\u5b83\u4f1a\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u6240\u6709\u5c0f\u5199\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\u5b57\u6bcd\uff0c\u800c\u4e0d\u6539\u53d8\u5176\u4ed6\u5b57\u7b26\u3002\u8fd9\u4e2a\u65b9\u6cd5\u5bf9\u5904\u7406\u9700\u8981\u7edf\u4e00\u683c\u5f0f\u7684\u5927\u5199\u5b57\u7b26\u4e32\u7279\u522b\u6709\u7528\uff0c\u6bd4\u5982\u5904\u7406\u7528\u6237\u8f93\u5165\u7684\u6587\u672c\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">string = &quot;hello world&quot;<\/p>\n<p>upper_string = string.upper()<\/p>\n<p>print(upper_string)  # \u8f93\u51fa\uff1aHELLO WORLD<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u8c03\u7528<code>upper()<\/code>\u65b9\u6cd5\u65f6\uff0c\u5b57\u7b26\u4e32<code>&quot;hello world&quot;<\/code>\u88ab\u8f6c\u6362\u4e3a\u5927\u5199\u7684<code>&quot;HELLO WORLD&quot;<\/code>\u3002<strong>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c<code>upper()<\/code>\u65b9\u6cd5\u4e0d\u4f1a\u6539\u53d8\u539f\u59cb\u5b57\u7b26\u4e32\uff0c\u800c\u662f\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u5b57\u7b26\u4e32<\/strong>\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4e0e\u5176\u4ed6\u65b9\u6cd5\u7684\u6bd4\u8f83<\/h3>\n<\/p>\n<p><p>\u9664\u4e86<code>upper()<\/code>\u65b9\u6cd5\uff0cPython\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5176\u4ed6\u7684\u5b57\u7b26\u4e32\u65b9\u6cd5\u6765\u5904\u7406\u5927\u5c0f\u5199\uff0c\u6bd4\u5982<code>lower()<\/code>\u3001<code>capitalize()<\/code>\u548c<code>title()<\/code>\u3002<strong><code>lower()<\/code>\u65b9\u6cd5\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u6240\u6709\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5c0f\u5199\uff0c<code>capitalize()<\/code>\u65b9\u6cd5\u5c06\u5b57\u7b26\u4e32\u7684\u7b2c\u4e00\u4e2a\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\uff0c\u800c<code>title()<\/code>\u65b9\u6cd5\u5c06\u6bcf\u4e2a\u5355\u8bcd\u7684\u9996\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199<\/strong>\u3002\u4e86\u89e3\u8fd9\u4e9b\u65b9\u6cd5\u7684\u533a\u522b\uff0c\u6709\u52a9\u4e8e\u9009\u62e9\u6700\u5408\u9002\u7684\u65b9\u6cd5\u6765\u5904\u7406\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u8fd9\u4e9b\u65b9\u6cd5\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">string = &quot;hello world&quot;<\/p>\n<p>print(string.lower())       # \u8f93\u51fa\uff1ahello world<\/p>\n<p>print(string.capitalize())  # \u8f93\u51fa\uff1aHello world<\/p>\n<p>print(string.title())       # \u8f93\u51fa\uff1aHello World<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5e94\u7528\u573a\u666f<\/h3>\n<\/p>\n<p><p>\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5927\u5199\u5728\u8bb8\u591a\u5b9e\u9645\u5e94\u7528\u4e2d\u975e\u5e38\u6709\u7528\uff0c\u5c24\u5176\u662f\u5728\u5904\u7406\u7528\u6237\u8f93\u5165\u3001\u751f\u6210\u62a5\u544a\u3001\u6570\u636e\u6e05\u7406\u548c\u683c\u5f0f\u5316\u8f93\u51fa\u65f6\u3002\u4f8b\u5982\uff0c\u5728\u5904\u7406\u7528\u6237\u6ce8\u518c\u4fe1\u606f\u65f6\uff0c\u53ef\u80fd\u5e0c\u671b\u5c06\u6240\u6709\u7528\u6237\u8f93\u5165\u7684\u540d\u79f0\u8f6c\u6362\u4e3a\u5927\u5199\uff0c\u4ee5\u4fbf\u8fdb\u884c\u4e00\u81f4\u7684\u6bd4\u8f83\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">user_input = input(&quot;Enter your name: &quot;)<\/p>\n<p>formatted_input = user_input.upper()<\/p>\n<p>print(f&quot;Hello, {formatted_input}!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u7528\u6237\u8f93\u5165\u7684\u540d\u79f0\u5c06\u88ab\u8f6c\u6362\u4e3a\u5927\u5199\uff0c\u4ee5\u786e\u4fdd\u6240\u6709\u8f93\u5165\u90fd\u5177\u6709\u4e00\u81f4\u7684\u683c\u5f0f\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5b57\u7b26\u4e32\u7684\u4e0d\u53ef\u53d8\u6027<\/h3>\n<\/p>\n<p><p><strong>\u5728Python\u4e2d\uff0c\u5b57\u7b26\u4e32\u662f\u4e0d\u53ef\u53d8\u7684<\/strong>\u3002\u8fd9\u610f\u5473\u7740\u4efb\u4f55\u5b57\u7b26\u4e32\u65b9\u6cd5\uff08\u5305\u62ec<code>upper()<\/code>\uff09\u90fd\u4e0d\u4f1a\u6539\u53d8\u539f\u59cb\u5b57\u7b26\u4e32\uff0c\u800c\u662f\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u5b57\u7b26\u4e32\u3002\u8fd9\u4e00\u7279\u6027\u5728\u5904\u7406\u5b57\u7b26\u4e32\u65f6\u9700\u8981\u7279\u522b\u6ce8\u610f\uff0c\u5c24\u5176\u662f\u5728\u6267\u884c\u9700\u8981\u591a\u6b21\u64cd\u4f5c\u7684\u4efb\u52a1\u65f6\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">string = &quot;hello world&quot;<\/p>\n<p>upper_string = string.upper()<\/p>\n<p>print(string)        # \u8f93\u51fa\uff1ahello world<\/p>\n<p>print(upper_string)  # \u8f93\u51fa\uff1aHELLO WORLD<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u539f\u59cb\u5b57\u7b26\u4e32<code>string<\/code>\u4fdd\u6301\u4e0d\u53d8\uff0c\u800c<code>upper_string<\/code>\u662f\u4e00\u4e2a\u65b0\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u5904\u7406\u975e\u82f1\u8bed\u5b57\u7b26<\/h3>\n<\/p>\n<p><p>Python\u7684<code>upper()<\/code>\u65b9\u6cd5\u540c\u6837\u9002\u7528\u4e8e\u5305\u542b\u975e\u82f1\u8bed\u5b57\u6bcd\u7684\u5b57\u7b26\u4e32\u3002\u4f8b\u5982\uff0c\u5728\u5904\u7406\u5305\u542b\u897f\u73ed\u7259\u8bed\u3001\u5fb7\u8bed\u6216\u5176\u4ed6\u8bed\u8a00\u5b57\u7b26\u7684\u5b57\u7b26\u4e32\u65f6\uff0c<code>upper()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u6b63\u786e\u5730\u5c06\u8fd9\u4e9b\u5b57\u7b26\u8f6c\u6362\u4e3a\u5927\u5199\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">string = &quot;\u00a1hola mundo!&quot;<\/p>\n<p>upper_string = string.upper()<\/p>\n<p>print(upper_string)  # \u8f93\u51fa\uff1a\u00a1HOLA MUNDO!<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u5904\u7406\u5305\u542b\u897f\u73ed\u7259\u8bed\u5b57\u7b26\u7684\u5b57\u7b26\u4e32\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u5927\u5199\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u4e0e\u5b57\u6bcd\u76f8\u5173\u7684\u5176\u4ed6\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u4e4b\u524d\u63d0\u5230\u7684<code>lower()<\/code>\u3001<code>capitalize()<\/code>\u548c<code>title()<\/code>\uff0cPython\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5176\u4ed6\u4e0e\u5b57\u6bcd\u76f8\u5173\u7684\u65b9\u6cd5\u3002\u4f8b\u5982\uff0c<code>swapcase()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u5927\u5199\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5c0f\u5199\uff0c\u800c\u5c0f\u5199\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">string = &quot;Hello World&quot;<\/p>\n<p>swapped_string = string.swapcase()<\/p>\n<p>print(swapped_string)  # \u8f93\u51fa\uff1ahELLO wORLD<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u65b9\u6cd5\u5728\u5904\u7406\u9700\u8981\u53cd\u8f6c\u5927\u5c0f\u5199\u7684\u5b57\u7b26\u4e32\u65f6\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u5bf9\u5b57\u7b26\u4e32\u8fdb\u884c\u66f4\u590d\u6742\u7684\u5904\u7406\uff0c\u6b64\u65f6\u53ef\u4ee5\u8003\u8651\u4f7f\u7528Python\u7684<code>re<\/code>\u6a21\u5757\uff08\u6b63\u5219\u8868\u8fbe\u5f0f\uff09\u3002\u5c3d\u7ba1<code>upper()<\/code>\u65b9\u6cd5\u5df2\u7ecf\u8db3\u591f\u5f3a\u5927\uff0c\u4f46\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u4f9b\u4e86\u66f4\u5f3a\u5927\u7684\u5b57\u7b26\u4e32\u5904\u7406\u529f\u80fd\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u67e5\u627e\u7279\u5b9a\u6a21\u5f0f\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u5927\u5199\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>string = &quot;hello world&quot;<\/p>\n<p>pattern = r&quot;world&quot;<\/p>\n<p>replacement = lambda match: match.group(0).upper()<\/p>\n<p>result = re.sub(pattern, replacement, string)<\/p>\n<p>print(result)  # \u8f93\u51fa\uff1ahello WORLD<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u627e\u5b57\u7b26\u4e32\u4e2d\u7684<code>&quot;world&quot;<\/code>\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u5927\u5199\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u5904\u7406\u957f\u5b57\u7b26\u4e32<\/h3>\n<\/p>\n<p><p><strong>\u5728\u5904\u7406\u957f\u5b57\u7b26\u4e32\u6216\u5927\u6570\u636e\u96c6\u65f6\uff0c\u6548\u7387\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u8003\u8651\u56e0\u7d20<\/strong>\u3002\u867d\u7136<code>upper()<\/code>\u65b9\u6cd5\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u90fd\u8868\u73b0\u826f\u597d\uff0c\u4f46\u5728\u5904\u7406\u975e\u5e38\u957f\u7684\u5b57\u7b26\u4e32\u65f6\uff0c\u53ef\u80fd\u9700\u8981\u8003\u8651\u5176\u6027\u80fd\u3002\u53ef\u4ee5\u901a\u8fc7\u6d4b\u91cf\u6267\u884c\u65f6\u95f4\u6765\u8bc4\u4f30\u5176\u6027\u80fd\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import time<\/p>\n<p>long_string = &quot;hello world&quot; * 1000000<\/p>\n<p>start_time = time.time()<\/p>\n<p>upper_string = long_string.upper()<\/p>\n<p>end_time = time.time()<\/p>\n<p>print(f&quot;Execution time: {end_time - start_time} seconds&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u6d4b\u91cf<code>upper()<\/code>\u65b9\u6cd5\u5728\u5904\u7406\u957f\u5b57\u7b26\u4e32\u65f6\u7684\u6267\u884c\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><h3>\u4e5d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u603b\u7684\u6765\u8bf4\uff0c\u5728Python\u4e2d\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5927\u5199\u662f\u4e00\u9879\u975e\u5e38\u57fa\u7840\u4e14\u5e38\u7528\u7684\u64cd\u4f5c\u3002\u901a\u8fc7\u4f7f\u7528<code>upper()<\/code>\u65b9\u6cd5\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u6240\u6709\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\uff0c\u4ece\u800c\u5728\u5404\u79cd\u5e94\u7528\u573a\u666f\u4e2d\u5b9e\u73b0\u4e00\u81f4\u7684\u6587\u672c\u683c\u5f0f\u3002\u4e86\u89e3\u5e76\u719f\u7ec3\u4f7f\u7528\u8fd9\u4e9b\u5b57\u7b26\u4e32\u65b9\u6cd5\uff0c\u5c06\u6709\u52a9\u4e8e\u66f4\u9ad8\u6548\u5730\u5904\u7406\u548c\u64cd\u4f5c\u5b57\u7b26\u4e32\u6570\u636e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5927\u5199\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b57\u7b26\u4e32\u5bf9\u8c61\u7684<code>upper()<\/code>\u65b9\u6cd5\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u6240\u6709\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\u3002\u4f8b\u5982\uff0c<code>my_string = &quot;hello&quot;<\/code>\uff0c\u901a\u8fc7\u8c03\u7528<code>my_string.upper()<\/code>\uff0c\u8fd4\u56de\u7684\u7ed3\u679c\u5c06\u662f<code>&quot;HELLO&quot;<\/code>\u3002\u8fd9\u4e2a\u65b9\u6cd5\u4e0d\u4f1a\u6539\u53d8\u539f\u59cb\u5b57\u7b26\u4e32\uff0c\u800c\u662f\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n<p><strong>Python\u4e2d\u662f\u5426\u6709\u5176\u4ed6\u65b9\u6cd5\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u5927\u5199\uff1f<\/strong><br \/>\u9664\u4e86<code>upper()<\/code>\u65b9\u6cd5\uff0cPython\u8fd8\u63d0\u4f9b\u4e86<code>str.capitalize()<\/code>\u548c<code>str.title()<\/code>\u65b9\u6cd5\u3002<code>capitalize()<\/code>\u65b9\u6cd5\u5c06\u5b57\u7b26\u4e32\u7684\u7b2c\u4e00\u4e2a\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\uff0c\u5176\u4ed6\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5c0f\u5199\uff1b<code>title()<\/code>\u65b9\u6cd5\u5219\u5c06\u5b57\u7b26\u4e32\u4e2d\u6bcf\u4e2a\u5355\u8bcd\u7684\u9996\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5927\u5199\u3002\u4f8b\u5982\uff0c<code>&quot;hello world&quot;.capitalize()<\/code>\u4f1a\u8fd4\u56de<code>&quot;Hello world&quot;<\/code>\uff0c\u800c<code>&quot;hello world&quot;.title()<\/code>\u4f1a\u8fd4\u56de<code>&quot;Hello World&quot;<\/code>\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u5904\u7406\u5305\u542b\u975e\u5b57\u6bcd\u5b57\u7b26\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5927\u5199\uff1f<\/strong><br \/>\u5f53\u4f7f\u7528<code>upper()<\/code>\u65b9\u6cd5\u8f6c\u6362\u5b57\u7b26\u4e32\u65f6\uff0c\u6240\u6709\u5b57\u6bcd\u5b57\u7b26\u90fd\u5c06\u88ab\u8f6c\u6362\u4e3a\u5927\u5199\uff0c\u800c\u975e\u5b57\u6bcd\u5b57\u7b26\uff08\u5982\u6570\u5b57\u3001\u6807\u70b9\u7b26\u53f7\u7b49\uff09\u5c06\u4fdd\u6301\u4e0d\u53d8\u3002\u4f8b\u5982\uff0c<code>&quot;hello world 123!&quot;<\/code>\u8c03\u7528<code>upper()<\/code>\u540e\uff0c\u5c06\u8fd4\u56de<code>&quot;HELLO WORLD 123!&quot;<\/code>\u3002\u56e0\u6b64\uff0c\u65e0\u8bba\u5b57\u7b26\u4e32\u4e2d\u5305\u542b\u4f55\u79cd\u5b57\u7b26\uff0c\u65b9\u6cd5\u7684\u6267\u884c\u90fd\u4e0d\u4f1a\u5f71\u54cd\u975e\u5b57\u6bcd\u5b57\u7b26\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u5185\u7f6e\u7684upper()\u65b9\u6cd5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5927\u5199\u3002\u5177\u4f53\u65b9\u6cd5\u662f\u8c03\u7528\u5b57\u7b26\u4e32\u5bf9\u8c61\u7684upper [&hellip;]","protected":false},"author":3,"featured_media":1059614,"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\/1059608"}],"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=1059608"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1059608\/revisions"}],"predecessor-version":[{"id":1059617,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1059608\/revisions\/1059617"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1059614"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1059608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1059608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1059608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}