{"id":1060952,"date":"2024-12-31T15:38:33","date_gmt":"2024-12-31T07:38:33","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1060952.html"},"modified":"2024-12-31T15:38:35","modified_gmt":"2024-12-31T07:38:35","slug":"%e5%a6%82%e4%bd%95%e8%bd%ac%e6%8d%a2%e6%95%b0%e6%8d%ae%e7%b1%bb%e5%9e%8b%e5%9c%a8python%e4%b8%ad","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1060952.html","title":{"rendered":"\u5982\u4f55\u8f6c\u6362\u6570\u636e\u7c7b\u578b\u5728python\u4e2d"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/90a6a53d-88dd-46a9-bde2-7fb71ebf951c.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\u5982\u4f55\u8f6c\u6362\u6570\u636e\u7c7b\u578b\u5728python\u4e2d\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u8f6c\u6362\u6570\u636e\u7c7b\u578b\u4e3b\u8981\u901a\u8fc7\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\uff0c\u5982int()\u3001float()\u3001str()\u3001list()\u3001tuple()\u7b49\uff0c\u6765\u5b9e\u73b0\u3002\u8fd9\u4e9b\u51fd\u6570\u53ef\u4ee5\u5c06\u4e00\u4e2a\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u4e3a\u53e6\u4e00\u4e2a\u6570\u636e\u7c7b\u578b\u3002\u4e3a\u4e86\u8be6\u7ec6\u89e3\u91ca\u8fd9\u4e00\u70b9\uff0c\u6211\u4eec\u5c06\u4e3b\u8981\u4ecb\u7ecd\u51e0\u79cd\u5e38\u89c1\u7684\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u6cd5\uff0c\u5e76\u63d0\u4f9b\u76f8\u5e94\u7684\u4ee3\u7801\u793a\u4f8b\u3002<\/strong><\/p>\n<\/p>\n<p><p><strong>1\u3001\u6574\u6570\u548c\u6d6e\u70b9\u6570\u4e4b\u95f4\u7684\u8f6c\u6362<\/strong><\/p>\n<\/p>\n<p><p>\u6574\u6570\u548c\u6d6e\u70b9\u6570\u4e4b\u95f4\u7684\u8f6c\u6362\u662f\u6700\u57fa\u672c\u4e5f\u662f\u6700\u5e38\u89c1\u7684\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u4e4b\u4e00\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528int()\u51fd\u6570\u5c06\u6d6e\u70b9\u6570\u8f6c\u6362\u4e3a\u6574\u6570\uff0c\u4f7f\u7528float()\u51fd\u6570\u5c06\u6574\u6570\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\u3002<\/p>\n<\/p>\n<p><p><strong>2\u3001\u5b57\u7b26\u4e32\u548c\u6570\u503c\u7c7b\u578b\u4e4b\u95f4\u7684\u8f6c\u6362<\/strong><\/p>\n<\/p>\n<p><p>\u5b57\u7b26\u4e32\u548c\u6570\u503c\u7c7b\u578b\uff08\u6574\u6570\u548c\u6d6e\u70b9\u6570\uff09\u4e4b\u95f4\u7684\u8f6c\u6362\u5728\u6570\u636e\u5904\u7406\u548c\u7528\u6237\u8f93\u5165\u65f6\u975e\u5e38\u5e38\u89c1\u3002\u53ef\u4ee5\u4f7f\u7528str()\u51fd\u6570\u5c06\u6570\u503c\u7c7b\u578b\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\uff0c\u800c\u4f7f\u7528int()\u548cfloat()\u51fd\u6570\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u76f8\u5e94\u7684\u6570\u503c\u7c7b\u578b\u3002<\/p>\n<\/p>\n<p><p><strong>3\u3001\u5217\u8868\u548c\u5143\u7ec4\u4e4b\u95f4\u7684\u8f6c\u6362<\/strong><\/p>\n<\/p>\n<p><p>\u5217\u8868\u548c\u5143\u7ec4\u662fPython\u4e2d\u4e24\u79cd\u5e38\u7528\u7684\u5e8f\u5217\u7c7b\u578b\u3002\u53ef\u4ee5\u4f7f\u7528list()\u51fd\u6570\u5c06\u5143\u7ec4\u8f6c\u6362\u4e3a\u5217\u8868\uff0c\u4f7f\u7528tuple()\u51fd\u6570\u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u5143\u7ec4\u3002<\/p>\n<\/p>\n<p><p><strong>4\u3001\u5b57\u5178\u548c\u5217\u8868\u4e4b\u95f4\u7684\u8f6c\u6362<\/strong><\/p>\n<\/p>\n<p><p>\u5b57\u5178\u548c\u5217\u8868\u662fPython\u4e2d\u4e24\u79cd\u91cd\u8981\u7684\u6570\u636e\u7ed3\u6784\u3002\u867d\u7136\u4e0d\u80fd\u76f4\u63a5\u4e92\u76f8\u8f6c\u6362\uff0c\u4f46\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u65b9\u6cd5\u5c06\u5b57\u5178\u7684\u952e\u3001\u503c\u6216\u9879\u8f6c\u6362\u4e3a\u5217\u8868\uff0c\u6216\u8005\u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u5b57\u5178\u3002<\/p>\n<\/p>\n<p><p><strong>5\u3001\u96c6\u5408\u548c\u5217\u8868\u4e4b\u95f4\u7684\u8f6c\u6362<\/strong><\/p>\n<\/p>\n<p><p>\u96c6\u5408\u548c\u5217\u8868\u5728Python\u4e2d\u90fd\u6709\u5e7f\u6cdb\u7684\u5e94\u7528\u3002\u53ef\u4ee5\u4f7f\u7528set()\u51fd\u6570\u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u96c6\u5408\uff0c\u4f7f\u7528list()\u51fd\u6570\u5c06\u96c6\u5408\u8f6c\u6362\u4e3a\u5217\u8868\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u6574\u6570\u548c\u6d6e\u70b9\u6570\u4e4b\u95f4\u7684\u8f6c\u6362<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u6574\u6570\u548c\u6d6e\u70b9\u6570\u4e4b\u95f4\u7684\u8f6c\u6362\u975e\u5e38\u7b80\u5355\u3002\u53ef\u4ee5\u4f7f\u7528int()\u51fd\u6570\u5c06\u6d6e\u70b9\u6570\u8f6c\u6362\u4e3a\u6574\u6570\uff0c\u4f7f\u7528float()\u51fd\u6570\u5c06\u6574\u6570\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5c06\u6d6e\u70b9\u6570\u8f6c\u6362\u4e3a\u6574\u6570<\/p>\n<p>float_number = 12.34<\/p>\n<p>int_number = int(float_number)<\/p>\n<p>print(int_number)  # \u8f93\u51fa: 12<\/p>\n<h2><strong>\u5c06\u6574\u6570\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570<\/strong><\/h2>\n<p>int_number = 56<\/p>\n<p>float_number = float(int_number)<\/p>\n<p>print(float_number)  # \u8f93\u51fa: 56.0<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5f53\u5c06\u6d6e\u70b9\u6570\u8f6c\u6362\u4e3a\u6574\u6570\u65f6\uff0c\u5c0f\u6570\u90e8\u5206\u4f1a\u88ab\u820d\u5f03\uff0c\u800c\u4e0d\u662f\u56db\u820d\u4e94\u5165\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u5b57\u7b26\u4e32\u548c\u6570\u503c\u7c7b\u578b\u4e4b\u95f4\u7684\u8f6c\u6362<\/h3>\n<\/p>\n<p><p>\u5b57\u7b26\u4e32\u548c\u6570\u503c\u7c7b\u578b\uff08\u6574\u6570\u548c\u6d6e\u70b9\u6570\uff09\u4e4b\u95f4\u7684\u8f6c\u6362\u5728\u6570\u636e\u5904\u7406\u548c\u7528\u6237\u8f93\u5165\u65f6\u975e\u5e38\u5e38\u89c1\u3002\u53ef\u4ee5\u4f7f\u7528str()\u51fd\u6570\u5c06\u6570\u503c\u7c7b\u578b\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\uff0c\u800c\u4f7f\u7528int()\u548cfloat()\u51fd\u6570\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u76f8\u5e94\u7684\u6570\u503c\u7c7b\u578b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5c06\u6574\u6570\u548c\u6d6e\u70b9\u6570\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32<\/p>\n<p>int_number = 123<\/p>\n<p>float_number = 45.67<\/p>\n<p>int_str = str(int_number)<\/p>\n<p>float_str = str(float_number)<\/p>\n<p>print(int_str)  # \u8f93\u51fa: &#39;123&#39;<\/p>\n<p>print(float_str)  # \u8f93\u51fa: &#39;45.67&#39;<\/p>\n<h2><strong>\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\u548c\u6d6e\u70b9\u6570<\/strong><\/h2>\n<p>int_str = &#39;789&#39;<\/p>\n<p>float_str = &#39;12.34&#39;<\/p>\n<p>int_number = int(int_str)<\/p>\n<p>float_number = float(float_str)<\/p>\n<p>print(int_number)  # \u8f93\u51fa: 789<\/p>\n<p>print(float_number)  # \u8f93\u51fa: 12.34<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u503c\u7c7b\u578b\u65f6\uff0c\u9700\u8981\u786e\u4fdd\u5b57\u7b26\u4e32\u80fd\u591f\u6b63\u786e\u8868\u793a\u4e00\u4e2a\u6709\u6548\u7684\u6570\u503c\uff0c\u5426\u5219\u4f1a\u5f15\u53d1ValueError\u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u5217\u8868\u548c\u5143\u7ec4\u4e4b\u95f4\u7684\u8f6c\u6362<\/h3>\n<\/p>\n<p><p>\u5217\u8868\u548c\u5143\u7ec4\u662fPython\u4e2d\u4e24\u79cd\u5e38\u7528\u7684\u5e8f\u5217\u7c7b\u578b\u3002\u53ef\u4ee5\u4f7f\u7528list()\u51fd\u6570\u5c06\u5143\u7ec4\u8f6c\u6362\u4e3a\u5217\u8868\uff0c\u4f7f\u7528tuple()\u51fd\u6570\u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u5143\u7ec4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5c06\u5143\u7ec4\u8f6c\u6362\u4e3a\u5217\u8868<\/p>\n<p>tuple_data = (1, 2, 3, 4)<\/p>\n<p>list_data = list(tuple_data)<\/p>\n<p>print(list_data)  # \u8f93\u51fa: [1, 2, 3, 4]<\/p>\n<h2><strong>\u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u5143\u7ec4<\/strong><\/h2>\n<p>list_data = [5, 6, 7, 8]<\/p>\n<p>tuple_data = tuple(list_data)<\/p>\n<p>print(tuple_data)  # \u8f93\u51fa: (5, 6, 7, 8)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8f6c\u6362\u540e\u7684\u6570\u636e\u7c7b\u578b\u62e5\u6709\u4e0e\u539f\u6570\u636e\u7c7b\u578b\u76f8\u540c\u7684\u5143\u7d20\uff0c\u4f46\u53ef\u4ee5\u8fdb\u884c\u4e0d\u540c\u7684\u64cd\u4f5c\uff0c\u5982\u5217\u8868\u662f\u53ef\u53d8\u7684\uff0c\u800c\u5143\u7ec4\u662f\u4e0d\u53ef\u53d8\u7684\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5b57\u5178\u548c\u5217\u8868\u4e4b\u95f4\u7684\u8f6c\u6362<\/h3>\n<\/p>\n<p><p>\u5b57\u5178\u548c\u5217\u8868\u662fPython\u4e2d\u4e24\u79cd\u91cd\u8981\u7684\u6570\u636e\u7ed3\u6784\u3002\u867d\u7136\u4e0d\u80fd\u76f4\u63a5\u4e92\u76f8\u8f6c\u6362\uff0c\u4f46\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u65b9\u6cd5\u5c06\u5b57\u5178\u7684\u952e\u3001\u503c\u6216\u9879\u8f6c\u6362\u4e3a\u5217\u8868\uff0c\u6216\u8005\u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u5b57\u5178\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5c06\u5b57\u5178\u7684\u952e\u3001\u503c\u548c\u9879\u8f6c\u6362\u4e3a\u5217\u8868<\/p>\n<p>dict_data = {&#39;a&#39;: 1, &#39;b&#39;: 2, &#39;c&#39;: 3}<\/p>\n<p>keys_list = list(dict_data.keys())<\/p>\n<p>values_list = list(dict_data.values())<\/p>\n<p>items_list = list(dict_data.items())<\/p>\n<p>print(keys_list)  # \u8f93\u51fa: [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;]<\/p>\n<p>print(values_list)  # \u8f93\u51fa: [1, 2, 3]<\/p>\n<p>print(items_list)  # \u8f93\u51fa: [(&#39;a&#39;, 1), (&#39;b&#39;, 2), (&#39;c&#39;, 3)]<\/p>\n<h2><strong>\u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u5b57\u5178<\/strong><\/h2>\n<p>keys_list = [&#39;x&#39;, &#39;y&#39;, &#39;z&#39;]<\/p>\n<p>values_list = [7, 8, 9]<\/p>\n<p>dict_data = dict(zip(keys_list, values_list))<\/p>\n<p>print(dict_data)  # \u8f93\u51fa: {&#39;x&#39;: 7, &#39;y&#39;: 8, &#39;z&#39;: 9}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u5b57\u5178\u65f6\uff0c\u4f7f\u7528zip()\u51fd\u6570\u5c06\u4e24\u4e2a\u5217\u8868\u6253\u5305\u6210\u952e\u503c\u5bf9\uff0c\u7136\u540e\u4f20\u9012\u7ed9dict()\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u96c6\u5408\u548c\u5217\u8868\u4e4b\u95f4\u7684\u8f6c\u6362<\/h3>\n<\/p>\n<p><p>\u96c6\u5408\u548c\u5217\u8868\u5728Python\u4e2d\u90fd\u6709\u5e7f\u6cdb\u7684\u5e94\u7528\u3002\u53ef\u4ee5\u4f7f\u7528set()\u51fd\u6570\u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u96c6\u5408\uff0c\u4f7f\u7528list()\u51fd\u6570\u5c06\u96c6\u5408\u8f6c\u6362\u4e3a\u5217\u8868\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u96c6\u5408<\/p>\n<p>list_data = [1, 2, 2, 3, 4, 4]<\/p>\n<p>set_data = set(list_data)<\/p>\n<p>print(set_data)  # \u8f93\u51fa: {1, 2, 3, 4}<\/p>\n<h2><strong>\u5c06\u96c6\u5408\u8f6c\u6362\u4e3a\u5217\u8868<\/strong><\/h2>\n<p>set_data = {5, 6, 7, 8}<\/p>\n<p>list_data = list(set_data)<\/p>\n<p>print(list_data)  # \u8f93\u51fa: [5, 6, 7, 8]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u96c6\u5408\u4f1a\u81ea\u52a8\u53bb\u9664\u5217\u8868\u4e2d\u7684\u91cd\u590d\u5143\u7d20\uff0c\u56e0\u6b64\u8f6c\u6362\u540e\u96c6\u5408\u4e2d\u7684\u5143\u7d20\u662f\u552f\u4e00\u7684\u3002<\/p>\n<\/p>\n<p><p>\u603b\u7ed3\u8d77\u6765\uff0cPython\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u5185\u7f6e\u51fd\u6570\u6765\u8fdb\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u3002<strong>\u901a\u8fc7\u7406\u89e3\u548c\u719f\u7ec3\u8fd0\u7528\u8fd9\u4e9b\u51fd\u6570\uff0c\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u6570\u636e\u7c7b\u578b\u4e4b\u95f4\u8fdb\u884c\u7075\u6d3b\u8f6c\u6362\uff0c\u4ece\u800c\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/strong>\u65e0\u8bba\u662f\u5728\u5904\u7406\u7528\u6237\u8f93\u5165\u3001\u6570\u636e\u5206\u6790\u8fd8\u662f\u5176\u4ed6\u7f16\u7a0b\u4efb\u52a1\u4e2d\uff0c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u90fd\u662f\u4e00\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u6280\u80fd\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u68c0\u67e5\u6570\u636e\u7684\u5f53\u524d\u7c7b\u578b\uff1f<\/strong><br \/>\u8981\u68c0\u67e5\u6570\u636e\u7684\u5f53\u524d\u7c7b\u578b\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>type()<\/code>\u51fd\u6570\u3002\u8fd9\u4e2a\u51fd\u6570\u4f1a\u8fd4\u56de\u5bf9\u8c61\u7684\u7c7b\u578b\u3002\u4f8b\u5982\uff0c<code>type(5)<\/code>\u4f1a\u8fd4\u56de<code>&lt;class &#39;int&#39;&gt;<\/code>\uff0c\u800c<code>type(3.14)<\/code>\u4f1a\u8fd4\u56de<code>&lt;class &#39;float&#39;&gt;<\/code>\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u7528\u6237\u53ef\u4ee5\u5feb\u901f\u4e86\u89e3\u4e00\u4e2a\u53d8\u91cf\u7684\u7c7b\u578b\uff0c\u4ee5\u4fbf\u51b3\u5b9a\u662f\u5426\u9700\u8981\u8fdb\u884c\u7c7b\u578b\u8f6c\u6362\u3002<\/p>\n<p><strong>Python\u652f\u6301\u54ea\u4e9b\u5e38\u89c1\u7684\u6570\u636e\u7c7b\u578b\u8f6c\u6362\uff1f<\/strong><br \/>Python\u4e2d\u5e38\u89c1\u7684\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u5305\u62ec\uff1a<code>int()<\/code>\u7528\u4e8e\u5c06\u5b57\u7b26\u4e32\u6216\u6d6e\u70b9\u6570\u8f6c\u6362\u4e3a\u6574\u6570\uff0c<code>float()<\/code>\u7528\u4e8e\u5c06\u6574\u6570\u6216\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\uff0c<code>str()<\/code>\u7528\u4e8e\u5c06\u6574\u6570\u6216\u6d6e\u70b9\u6570\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u3002\u6b64\u5916\uff0c<code>list()<\/code>\u548c<code>tuple()<\/code>\u51fd\u6570\u53ef\u4ee5\u5c06\u5176\u4ed6\u53ef\u8fed\u4ee3\u5bf9\u8c61\u8f6c\u6362\u4e3a\u5217\u8868\u6216\u5143\u7ec4\uff0c\u8fd9\u4e9b\u8f6c\u6362\u5728\u5904\u7406\u6570\u636e\u65f6\u975e\u5e38\u6709\u7528\u3002<\/p>\n<p><strong>\u5728\u8fdb\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65f6\uff0c\u6709\u54ea\u4e9b\u6ce8\u610f\u4e8b\u9879\uff1f<\/strong><br \/>\u5728\u8fdb\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a\u786e\u4fdd\u8981\u8f6c\u6362\u7684\u503c\u662f\u517c\u5bb9\u7684\uff0c\u4f8b\u5982\uff0c\u4e0d\u80fd\u5c06\u4e00\u4e2a\u5305\u542b\u5b57\u6bcd\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\u3002\u4f7f\u7528<code>try-except<\/code>\u5757\u53ef\u4ee5\u6355\u83b7\u53ef\u80fd\u51fa\u73b0\u7684\u5f02\u5e38\uff0c\u907f\u514d\u7a0b\u5e8f\u5d29\u6e83\u3002\u5bf9\u4e8e\u6d6e\u70b9\u6570\u8f6c\u6574\u6570\u65f6\uff0c\u6ce8\u610f\u5c0f\u6570\u90e8\u5206\u4f1a\u88ab\u622a\u65ad\uff0c\u800c\u4e0d\u662f\u56db\u820d\u4e94\u5165\u3002\u6b64\u5916\uff0c\u8f6c\u6362\u540e\u6570\u636e\u7684\u884c\u4e3a\u53ef\u80fd\u4f1a\u6709\u6240\u4e0d\u540c\uff0c\u56e0\u6b64\u5728\u8f6c\u6362\u540e\u9700\u8981\u9a8c\u8bc1\u7ed3\u679c\u662f\u5426\u7b26\u5408\u9884\u671f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u8f6c\u6362\u6570\u636e\u7c7b\u578b\u4e3b\u8981\u901a\u8fc7\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\uff0c\u5982int()\u3001float()\u3001str()\u3001list()\u3001t [&hellip;]","protected":false},"author":3,"featured_media":1060963,"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\/1060952"}],"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=1060952"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1060952\/revisions"}],"predecessor-version":[{"id":1060968,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1060952\/revisions\/1060968"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1060963"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1060952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1060952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1060952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}