{"id":124560,"date":"2026-11-19T05:08:46","date_gmt":"2026-11-18T21:08:46","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/124560.html"},"modified":"2026-11-19T05:08:46","modified_gmt":"2026-11-18T21:08:46","slug":"%e9%85%8d%e7%bd%ae%e8%a1%a8%e9%97%ae%e9%a2%98%ef%bc%9a%e5%86%99%e6%88%90%e3%80%8c1-200%e3%80%8d%e5%90%8e-float%e5%8f%98%e6%88%90-1-2%ef%bc%9f%e6%96%b0%e6%89%8b%e5%85%88%e5%88%86%e6%b8%85%e7%82%b9","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/124560.html","title":{"rendered":"\u914d\u7f6e\u8868\u95ee\u9898\uff1a\u5199\u6210\u300c1.200\u300d\u540e float()\u53d8\u6210 1.2\uff1f\u65b0\u624b\u5148\u5206\u6e05\u70b9\u548c\u9017\u53f7"},"content":{"rendered":"<p>        \/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/<br \/>\n        #content_views .toc,<br \/>\n        \/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/<br \/>\n        #content_views.markdown_views &gt; p:empty:has(+ .toc),<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty,<br \/>\n        \/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/<br \/>\n        #content_views.htmledit_views #main-toc,<br \/>\n        #content_views.htmledit_views #hr-toc,<br \/>\n        #content_views.htmledit_views p[id*=\\&#8221;-toc\\&#8221;] {<br \/>\n          display: none !important;<br \/>\n        }<br \/>\n        \/* \u76ee\u5f55\u53bb\u6389\u540e\uff0c\u7d27\u8ddf\u7684\u9996\u4e2a\u6807\u9898\u4e0d\u518d\u591a\u51fa\u4e00\u5757\u4e0a\u8fb9\u8ddd *\/<br \/>\n        #content_views.markdown_views &gt; .toc + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + h4,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h4 {<br \/>\n          margin-top: 0 !important;<br \/>\n        }<\/p>\n<p>\u5927\u5bb6\u597d&#xff0c;\u6211\u662f SiKi\u8001\u5e08\u3002\u5f88\u591a\u540c\u5b66\u4ece\u8868\u683c\u8f6f\u4ef6\u91cc\u628a\u9053\u5177\u8868\u5bfc\u51fa\u6210 CSV&#xff0c;\u518d\u5728 Python \u91cc\u7528 float() \u53bb\u8bfb\u300c\u4ef7\u683c\u300d\u300c\u91cd\u91cf\u300d\u8fd9\u7c7b\u5217&#xff0c;\u4f1a\u78b0\u5230\u53e6\u4e00\u79cd\u66f4\u4e0d\u5bb9\u6613\u5bdf\u89c9\u7684\u60c5\u51b5&#xff1a;\u5355\u5143\u683c\u91cc\u5199\u7684\u662f 1.200&#xff0c;\u672c\u610f\u662f\u4e00\u5343\u4e8c\u767e&#xff0c;\u7a0b\u5e8f\u5374\u9759\u6084\u6084\u5730\u5f97\u5230 1.2&#xff0c;\u65e2\u4e0d\u62a5\u9519&#xff0c;\u4e5f\u4e0d\u63d0\u9192\u3002\u4e0a\u4e00\u7bc7\u8bb2\u8fc7&#xff0c;\u5199\u6210 1,200 \u518d\u4e22\u7ed9 int() \u4f1a\u76f4\u63a5\u629b\u51fa ValueError&#xff0c;\u90a3\u79cd\u81f3\u5c11\u80fd\u770b\u89c1\u5931\u8d25&#xff1b;\u8fd9\u6b21\u7528\u70b9\u5f53\u5343\u5206\u4f4d&#xff0c;\u5931\u8d25\u88ab\u85cf\u8d77\u6765\u4e86\u3002\u5148\u522b\u6025\u7740\u6362\u5e93\u2014\u2014\u66f4\u5e38\u89c1\u7684\u7b2c\u4e00\u6b65\u662f&#xff1a;\u5148\u5206\u6e05\u8fd9\u5f20\u8868\u91cc\u7684\u70b9\u662f\u5c0f\u6570\u70b9&#xff0c;\u8fd8\u662f\u5343\u5206\u4f4d&#xff0c;\u518d\u51b3\u5b9a\u600e\u4e48\u8bfb\u3002<\/p>\n<p>\u672c\u6587\u5728 Linux \u4e0a\u7528 Python 3.12.15 \u8fd0\u884c&#xff0c;\u53e6\u7528 3.13.5 \u590d\u8dd1\u540c\u4e00\u6bb5\u4ee3\u7801&#xff0c;\u4e0b\u6587\u8d34\u51fa\u7684\u8f93\u51fa\u4e24\u7248\u9010\u884c\u4e00\u81f4\u3002\u5b98\u65b9\u5728\u7ebf\u6587\u6863 3.12 \u9875\u9762\u6807\u6ce8\u7684\u662f 3.12.16\u30013.13 \u9875\u9762\u6807\u6ce8\u7684\u662f 3.13.18&#xff0c;\u4e0e\u672c\u673a\u5dee\u51e0\u4e2a\u8865\u4e01\u53f7&#xff0c;\u6b63\u6587\u4ee5\u672c\u673a\u5b9e\u6d4b\u4e3a\u51c6\u3002\u793a\u4f8b\u5168\u90e8\u81ea\u62df&#xff0c;\u76f4\u63a5\u5199\u5728\u4ee3\u7801\u91cc\u7684\u5b57\u7b26\u4e32\u4e2d&#xff0c;\u4e0d\u8bfb\u5199\u771f\u5b9e\u914d\u7f6e\u8868&#xff0c;\u4e5f\u6ca1\u6709\u6d4b\u8bd5 Unity\u3001Godot \u7b49\u5f15\u64ce\u7684\u5bfc\u5165&#xff0c;\u4e5f\u6ca1\u6709\u6d4b\u8bd5\u7b2c\u4e09\u65b9\u8868\u683c\u5e93\u3002\u672c\u673a\u533a\u57df\u8bbe\u7f6e\u53ea\u6709 C.utf8&#xff0c;\u6ca1\u6709\u5b9e\u6d4b locale.atof \u4e00\u7c7b\u8ddf\u533a\u57df\u8d70\u7684\u8bfb\u6cd5&#xff0c;\u6b63\u6587\u4e5f\u4e0d\u5199\u5b83\u4eec\u7684\u884c\u4e3a\u3002<\/p>\n<h3>\u4e00 \u5148\u8ba4\u8bc6\u8fd9\u4e2a\u73b0\u8c61&#xff1a;\u5199\u6210\u300c1.200\u300d\u65f6&#xff0c;float() \u5f97\u5230\u7684\u662f 1.2<\/h3>\n<p>\u81ea\u62df\u4e00\u4e2a\u5f88\u5e38\u89c1\u7684\u5355\u5143\u683c\u503c&#xff0c;\u76f4\u63a5\u62ff\u53bb\u8f6c\u6362&#xff1a;<\/p>\n<p>text <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;1.200&#034;<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">repr<\/span><span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">float<\/span><span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">float<\/span><span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token number\">1.2<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">float<\/span><span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token number\">1200<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u672c\u673a 3.12.15 \/ 3.13.5 \u8f93\u51fa\u76f8\u540c&#xff1a;<\/p>\n<p>&#039;1.200&#039;<br \/>\n1.2<br \/>\nTrue<br \/>\nFalse<\/p>\n<p>\u4e5f\u5c31\u662f\u8bf4&#xff1a;float(&#034;1.200&#034;) \u4e0d\u4f46\u80fd\u8f6c\u6362\u6210\u529f&#xff0c;\u7ed3\u679c\u8fd8\u7cbe\u786e\u7b49\u4e8e 1.2&#xff0c;\u5e76\u4e0d\u7b49\u4e8e 1200\u3002\u7a0b\u5e8f\u4e0d\u4f1a\u629b\u5f02\u5e38\u3002\u82e5\u8fd9\u5f20\u8868\u7684\u672c\u610f\u662f\u300c\u4e00\u5343\u4e8c\u767e\u300d&#xff0c;\u540e\u9762\u7684\u8ba1\u7b97\u90fd\u4f1a\u6309 1.2 \u53bb\u8dd1&#xff0c;\u95ee\u9898\u4f1a\u5148\u8868\u73b0\u6210\u6570\u503c\u4e0d\u5bf9&#xff0c;\u800c\u4e0d\u662f\u542f\u52a8\u65f6\u62a5\u9519\u3002<\/p>\n<p>\u540c\u4e00\u53f0\u673a\u5668\u4e0a&#xff0c;\u4e0d\u5e26\u70b9\u7684\u6574\u6570\u5c31\u80fd\u8bfb\u6210\u4e00\u5343\u4e8c\u767e&#xff1a;<\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">float<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;1200&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>1200.0<\/p>\n<p>\u4e0a\u4e00\u7bc7\u91cc&#xff0c;int(&#034;1,200&#034;) \u4f1a\u62a5 ValueError\u3002\u5bf9\u7167\u4e00\u4e0b\u5c31\u6e05\u695a\u4e86&#xff1a;\u9017\u53f7\u5343\u5206\u4f4d\u662f\u300c\u4e00\u773c\u80fd\u770b\u89c1\u7684\u5931\u8d25\u300d&#xff0c;\u70b9\u88ab\u5f53\u6210\u5c0f\u6570\u70b9\u662f\u300c\u770b\u8d77\u6765\u6210\u529f\u3001\u6570\u503c\u5374\u53ef\u80fd\u9519\u4e86\u300d\u3002<\/p>\n<p>\u5982\u679c\u6539\u7528 int(&#034;1.200&#034;)&#xff0c;\u672c\u673a\u4f1a\u62a5 ValueError: invalid literal for int() with base 10: &#039;1.200&#039;\u3002\u6240\u4ee5\u4e0d\u662f\u300c\u5e26\u70b9\u7684\u5199\u6cd5\u4e00\u5f8b\u4f1a\u62a5\u9519\u300d&#xff0c;\u800c\u662f&#xff1a;\u4e22\u7ed9 float() \u65f6&#xff0c;\u8fd9\u4e2a\u70b9\u4f1a\u88ab\u5f53\u6210\u5c0f\u6570\u70b9&#xff0c;\u5e76\u4e14\u4e0d\u62a5\u9519\u3002<\/p>\n<h3>\u4e8c \u7b2c\u4e00\u6b65&#xff1a;\u5f04\u660e\u767d float() \u628a\u70b9\u5f53\u6210\u4ec0\u4e48<\/h3>\n<p>\u5b98\u65b9\u5bf9 float(\u5b57\u7b26\u4e32) \u7684\u8bf4\u660e\u5199\u5f97\u5f88\u6e05\u695a&#xff1a;\u5982\u679c\u53c2\u6570\u662f\u5b57\u7b26\u4e32&#xff0c;\u5b83\u5e94\u5f53\u8868\u793a\u4e00\u4e2a\u5341\u8fdb\u5236\u6570&#xff0c;\u524d\u9762\u53ef\u4ee5\u6709\u6b63\u8d1f\u53f7&#xff0c;\u4e24\u4fa7\u53ef\u4ee5\u6709\u7a7a\u767d\u3002\u66f4\u7cbe\u786e\u7684\u8f93\u5165\u89c4\u5219\u91cc&#xff0c;\u6570\u5b57\u4e2d\u95f4\u90a3\u4e2a\u70b9\u51fa\u73b0\u5728\u5b98\u65b9\u7ed9\u51fa\u7684\u8bed\u6cd5\u91cc&#xff0c;\u4f4d\u7f6e\u5c31\u662f\u5c0f\u6570\u70b9&#xff1a;\u4e00\u8fb9\u662f\u6574\u6570\u90e8\u5206&#xff0c;\u4e00\u8fb9\u662f\u5c0f\u6570\u90e8\u5206&#xff0c;\u4e5f\u53ef\u4ee5\u7701\u7565\u5176\u4e2d\u4e00\u8fb9\u3002\u5b98\u65b9\u4f8b\u5b50\u91cc&#xff0c;float(&#039;&#043;1.23&#039;) \u5f97\u5230 1.23&#xff0c;\u70b9\u540c\u6837\u662f\u5c0f\u6570\u70b9\u3002\u5b98\u65b9\u4ece 3.6 \u8d77\u5141\u8bb8\u7528\u4e0b\u5212\u7ebf\u5206\u7ec4&#xff0c;\u8fd9\u4e00\u70b9\u548c int() \u4e00\u81f4\u3002<\/p>\n<p>\u6240\u4ee5\u4e0b\u9762\u8fd9\u4e9b\u662f\u5b98\u65b9\u8ba4\u7684&#xff0c;\u672c\u673a\u4e24\u7248\u7ed3\u679c\u76f8\u540c&#xff1a;<\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">float<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;1200&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">float<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;1_200&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">float<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;  1.200\\\\n&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">float<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;&#043;1.200&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">float<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;-1.200&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>1200.0<br \/>\n1200.0<br \/>\n1.2<br \/>\n1.2<br \/>\n-1.2<\/p>\n<p>\u6ce8\u610f\u540e\u4e09\u884c&#xff1a;\u4e24\u4fa7\u7a7a\u767d\u3001\u6b63\u8d1f\u53f7\u90fd\u4e0d\u5f71\u54cd\u300c\u70b9\u662f\u5c0f\u6570\u70b9\u300d\u8fd9\u4ef6\u4e8b&#xff0c;1.200 \u4ecd\u7136\u662f\u4e00\u70b9\u4e8c&#xff0c;\u4e0d\u662f\u4e00\u5343\u4e8c\u767e\u3002\u771f\u6b63\u80fd\u8868\u793a\u4e00\u5343\u4e8c\u767e\u7684&#xff0c;\u662f\u4e0d\u5e26\u8fd9\u4e2a\u5c0f\u6570\u70b9\u7684 1200&#xff0c;\u6216\u5b98\u65b9\u5141\u8bb8\u7684\u4e0b\u5212\u7ebf\u5199\u6cd5 1_200\u3002<\/p>\n<p>\u800c\u8fd9\u4e9b\u4f1a\u62a5\u9519&#xff1a;float(&#034;1,200&#034;)\u3001float(&#034;1 200&#034;)\u3001float(&#034;1.200.000&#034;)\u3002\u9017\u53f7\u548c\u7a7a\u683c\u4e0d\u662f float() \u63a5\u53d7\u7684\u5206\u7ec4\u5199\u6cd5&#xff1b;\u4e24\u4e2a\u70b9\u4e5f\u4e0d\u7b26\u5408\u300c\u53ea\u80fd\u6709\u4e00\u4e2a\u5c0f\u6570\u70b9\u300d\u7684\u89c4\u5219&#xff0c;\u672c\u673a\u4f1a\u62a5 could not convert string to float: &#039;1.200.000&#039;\u3002\u6709\u7684\u5730\u533a\u4f1a\u628a\u4e00\u767e\u4e8c\u5341\u4e07\u5199\u6210 1.200.000&#xff0c;\u8fd9\u79cd\u5199\u6cd5\u4e22\u7ed9 float() \u4f1a\u5931\u8d25&#xff0c;\u81f3\u5c11\u8fd8\u80fd\u770b\u89c1\u62a5\u9519&#xff1b;\u5199\u6210\u4e00\u4e2a\u70b9\u7684 1.200 \u53cd\u800c\u66f4\u5bb9\u6613\u88ab\u9759\u9ed8\u8bfb\u6210 1.2\u3002<\/p>\n<p>\u8fd8\u6709\u4e00\u4ef6\u5bb9\u6613\u6df7\u5728\u4e00\u8d77\u7684\u4e8b&#xff1a;\u628a\u6570\u5b57\u5199\u7ed9\u522b\u4eba\u770b\u65f6&#xff0c;Python \u9ed8\u8ba4\u7528\u7684\u5343\u5206\u4f4d\u7b26\u53f7\u662f\u9017\u53f7&#xff0c;\u4e0d\u662f\u70b9\u3002\u5b98\u65b9\u683c\u5f0f\u5316\u8ff7\u4f60\u8bed\u8a00\u91cc&#xff0c;grouping \u9009\u9879 &#039;,&#039; \u7684\u542b\u4e49\u662f\u6bcf\u9694 3 \u4f4d\u63d2\u5165\u4e00\u4e2a\u9017\u53f7&#xff1a;<\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">format<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">1200<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;,&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>1,200<\/p>\n<p>\u8fd9\u662f\u8f93\u51fa\u7528\u7684\u5343\u5206\u4f4d&#xff0c;\u800c\u4e14\u7528\u7684\u662f\u9017\u53f7\u3002\u6709\u7684\u5730\u533a\u3001\u6709\u7684\u8868\u683c\u8f6f\u4ef6\u4f1a\u628a\u4e00\u5343\u4e8c\u767e\u5199\u6210 1.200 \u8fd9\u79cd\u5e26\u70b9\u7684\u6837\u5b50\u7ed9\u4eba\u770b\u3002\u8bfb\u8868\u7684\u65f6\u5019\u5982\u679c\u539f\u6837\u4e22\u7ed9 float()&#xff0c;\u5c31\u4f1a\u6b63\u597d\u649e\u4e0a\u7b2c\u4e00\u8282\u90a3\u79cd\u300c\u4e0d\u62a5\u9519\u3001\u4f46\u8bfb\u6210 1.2\u300d\u7684\u60c5\u51b5\u3002<\/p>\n<h3>\u4e09 \u7b2c\u4e8c\u6b65&#xff1a;\u5148\u7ea6\u5b9a\u8868\u91cc\u7684\u70b9\u662f\u4ec0\u4e48&#xff0c;\u518d\u51b3\u5b9a\u8981\u4e0d\u8981\u53bb\u70b9<\/h3>\n<p>\u66f4\u7a33\u59a5\u7684\u505a\u6cd5\u662f&#xff1a;\u6e90\u8868\u91cc\u7684\u6574\u6570\u5199\u6210 1200&#xff0c;\u6216\u8005\u5199\u6210\u5b98\u65b9\u8ba4\u7684 1_200&#xff1b;\u9700\u8981\u5c0f\u6570\u65f6&#xff0c;\u628a\u70b9\u660e\u786e\u5f53\u4f5c\u5c0f\u6570\u70b9\u6765\u7528\u3002\u4e0d\u8981\u5728\u8868\u91cc\u4f7f\u7528\u300c\u70b9\u5f53\u5343\u5206\u4f4d\u300d\u8fd9\u79cd\u5bb9\u6613\u548c\u5c0f\u6570\u70b9\u6253\u67b6\u7684\u5199\u6cd5\u3002 \u7ea6\u5b9a\u5199\u5728\u8bfb\u8868\u89c4\u5219\u91cc&#xff0c;\u6bd4\u5728\u4ee3\u7801\u91cc\u5230\u5904\u4fee\u8865\u8981\u5e72\u51c0\u3002<\/p>\n<p>\u5982\u679c\u624b\u4e0a\u5df2\u7ecf\u6709\u4e00\u6279\u5199\u6210 1.200 \u7684\u65e7\u8868&#xff0c;\u5fc5\u987b\u5148\u786e\u8ba4\u300c\u8fd9\u91cc\u7684\u70b9\u5230\u5e95\u662f\u5343\u5206\u4f4d&#xff0c;\u8fd8\u662f\u5c0f\u6570\u70b9\u300d&#xff1a;<\/p>\n<ul>\n<li>\u82e5\u70b9\u8868\u793a\u5c0f\u6570\u70b9&#xff0c;1.200 \u672c\u6765\u5c31\u662f\u4e00\u70b9\u4e8c&#xff0c;float() \u7684\u7ed3\u679c\u662f\u5bf9\u7684&#xff0c;\u4e0d\u8981\u53bb\u70b9&#xff1b;<\/li>\n<li>\u82e5\u5df2\u7ecf\u786e\u8ba4\u70b9\u8868\u793a\u5343\u5206\u4f4d&#xff0c;\u4e00\u5343\u4e8c\u767e\u88ab\u5199\u6210\u4e86 1.200&#xff0c;\u53ef\u4ee5\u5148\u53bb\u6389\u7ea6\u5b9a\u597d\u7684\u70b9&#xff0c;\u518d\u4ea4\u7ed9 float()\u3002<\/li>\n<\/ul>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">parse_float_with_dot_thousands<\/span><span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    text <span class=\"token operator\">&#061;<\/span> text<span class=\"token punctuation\">.<\/span>strip<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>replace<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;.&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token builtin\">float<\/span><span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>parse_float_with_dot_thousands<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;1.200&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>parse_float_with_dot_thousands<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;1.200.000&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u672c\u673a\u4e24\u7248\u8f93\u51fa&#xff1a;<\/p>\n<p>1200.0<br \/>\n1200000.0<\/p>\n<p>\u5173\u952e\u662f\u300c\u5df2\u7ecf\u786e\u8ba4\u70b9\u662f\u5343\u5206\u4f4d\u300d\u8fd9\u4e00\u53e5\u3002\u4e0d\u8981\u4e00\u89c1\u5230\u70b9\u5c31\u5220\u3002\u5982\u679c\u70b9\u5176\u5b9e\u662f\u5c0f\u6570\u70b9&#xff0c;\u76f2\u76ee\u53bb\u6389\u70b9\u4f1a\u628a 1.2 \u8bfb\u6210 12.0&#xff0c;\u7a0b\u5e8f\u7167\u6837\u4e0d\u62a5\u9519&#xff0c;\u6570\u503c\u5374\u5f80\u53e6\u4e00\u4e2a\u65b9\u5411\u9519\u4e86&#xff1a;<\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;1.2&#034;<\/span><span class=\"token punctuation\">.<\/span>replace<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;.&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">float<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;1.2&#034;<\/span><span class=\"token punctuation\">.<\/span>replace<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;.&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>12<br \/>\n12.0<\/p>\n<p>\u6240\u4ee5\u8bfb\u8868\u4e4b\u524d\u5148\u7ea6\u5b9a&#xff1a;\u8fd9\u5f20\u8868\u7684\u70b9\u662f\u5c0f\u6570\u70b9&#xff0c;\u8fd8\u662f\u5343\u5206\u4f4d\u3002\u7ea6\u5b9a\u4e0d\u6e05\u695a&#xff0c;\u5c31\u4e0d\u8981\u81ea\u52a8\u5220\u3002\u4e0a\u4e00\u7bc7\u5bf9\u9017\u53f7\u4e5f\u662f\u540c\u4e00\u4e2a\u539f\u5219&#xff1a;\u5148\u7ea6\u5b9a\u542b\u4e49&#xff0c;\u518d\u51b3\u5b9a\u8981\u4e0d\u8981\u53bb\u6389\u5206\u9694\u7b26\u3002<\/p>\n<h3>\u56db \u81ea\u68c0\u6e05\u5355\u548c\u8fb9\u754c<\/h3>\n<p>\u8bfb\u5230\u300c\u8868\u91cc\u5199\u7740 1.200&#xff0c;\u7a0b\u5e8f\u91cc\u5374\u662f 1.2&#xff0c;\u800c\u4e14\u6ca1\u6709\u62a5\u9519\u300d\u65f6&#xff0c;\u6309\u8fd9\u4e2a\u987a\u5e8f\u67e5&#xff1a;<\/p>\n<li>\u5148\u628a\u5355\u5143\u683c\u7684\u539f\u59cb\u5b57\u7b26\u4e32\u7528 repr() \u6253\u5370\u51fa\u6765&#xff0c;\u770b\u662f\u4e0d\u662f\u542b\u6709\u70b9\u3001\u9017\u53f7\u6216\u5176\u4ed6\u7b26\u53f7&#xff1b;<\/li>\n<li>\u5bf9\u7167\u5b98\u65b9\u5141\u8bb8\u7684\u5199\u6cd5&#xff1a;\u6b63\u8d1f\u53f7\u3001\u4e24\u4fa7\u7a7a\u767d\u3001\u6570\u5b57\u4e2d\u95f4\u7684\u5355\u4e2a\u4e0b\u5212\u7ebf\u53ef\u4ee5&#xff1b;\u70b9\u5728 float() \u91cc\u8868\u793a\u5c0f\u6570\u70b9&#xff0c;\u4e0d\u662f\u5343\u5206\u4f4d&#xff1b;<\/li>\n<li>\u5148\u7ea6\u5b9a\u6e90\u8868\u600e\u4e48\u5199\u2014\u2014\u6574\u6570\u4f18\u5148\u5199\u6210 1200 \u6216 1_200&#xff1b;\u9700\u8981\u5c0f\u6570\u65f6&#xff0c;\u628a\u70b9\u660e\u786e\u5f53\u4f5c\u5c0f\u6570\u70b9&#xff1b;<\/li>\n<li>\u53ea\u6709\u5df2\u7ecf\u786e\u8ba4\u70b9\u8868\u793a\u5343\u5206\u4f4d\u65f6&#xff0c;\u624d\u53bb\u6389\u70b9\u518d float()&#xff1b;\u70b9\u8868\u793a\u5c0f\u6570\u70b9\u65f6&#xff0c;\u4e0d\u8981\u53bb\u70b9&#xff1b;<\/li>\n<li>\u4e0d\u8981\u628a\u8868\u683c\u8f6f\u4ef6\u6309\u300c\u70b9\u5f53\u5343\u5206\u4f4d\u300d\u5199\u51fa\u6765\u7684\u6587\u672c&#xff0c;\u76f4\u63a5\u9001\u56de float()&#xff0c;\u5426\u5219\u53ef\u80fd\u9759\u9ed8\u8bfb\u6210\u5c0f\u6570&#xff1b;<\/li>\n<li>\u5bf9\u7167\u4e0a\u4e00\u7bc7&#xff1a;1,200 \u4e22\u7ed9 int() \u4f1a\u62a5\u9519&#xff0c;1.200 \u4e22\u7ed9 float() \u4e0d\u4f1a\u62a5\u9519&#xff0c;\u4e24\u79cd\u95ee\u9898\u7684\u6392\u67e5\u4fe1\u53f7\u4e0d\u4e00\u6837\u3002<\/li>\n<p>\u8fb9\u754c&#xff1a;<\/p>\n<ul>\n<li>\u5b98\u65b9\u6587\u6863\u7528\u8bed\u6cd5\u89c4\u5219\u8bf4\u660e float() \u5982\u4f55\u8bc6\u522b\u5e26\u70b9\u7684\u5341\u8fdb\u5236\u6570&#xff0c;\u5e76\u6ca1\u6709\u5355\u72ec\u5199\u300c\u628a 1.200 \u5f53\u6210\u5343\u5206\u4f4d\u4f1a\u5f97\u5230 1.2\u300d\u8fd9\u53e5&#xff1b;\u6b63\u6587\u91cc\u7684\u5177\u4f53\u7ed3\u679c\u6765\u81ea\u672c\u673a 3.12.15 \/ 3.13.5 \u5b9e\u6d4b&#xff1b;float() \u8ba4\u54ea\u4e9b\u5f62\u5f0f&#xff0c;\u5219\u4ee5\u5b98\u65b9 functions \u9875\u4e3a\u51c6&#xff1b;<\/li>\n<li>\u672c\u6587\u53ea\u8bb2\u7528\u5185\u7f6e float() \/ int() \/ format() \u5904\u7406\u81ea\u62df\u5b57\u7b26\u4e32&#xff0c;\u6ca1\u6709\u6d4b\u8bd5\u7b2c\u4e09\u65b9\u8868\u683c\u5e93\u3001\u8868\u683c\u8f6f\u4ef6\u5bfc\u51fa\u65f6\u7684\u5177\u4f53\u9009\u9879&#xff0c;\u4e5f\u6ca1\u6709\u6d4b\u8bd5 Unity\u3001Godot \u7b49\u5f15\u64ce\u7684\u5bfc\u5165&#xff1b;<\/li>\n<li>\u672c\u673a\u533a\u57df\u8bbe\u7f6e\u53ea\u6709 C.utf8&#xff0c;\u6ca1\u6709\u5b9e\u6d4b locale.atof \u6216\u5176\u4ed6\u8ddf\u968f\u533a\u57df\u8bbe\u7f6e\u7684\u8bfb\u6cd5&#xff0c;\u6b63\u6587\u4e0d\u5199\u5b83\u4eec\u4f1a\u5f97\u5230\u4ec0\u4e48\u7ed3\u679c&#xff0c;\u4e5f\u4e0d\u628a\u5b83\u4eec\u5f53\u4f5c\u6e38\u620f\u914d\u7f6e\u8868\u7684\u9ed8\u8ba4\u8bfb\u6cd5&#xff1b;<\/li>\n<li>\u6709\u7684\u8868\u4f1a\u628a\u6b27\u6d32\u4e60\u60ef\u91cc\u7684\u5c0f\u6570\u5199\u6210 1,5&#xff08;\u9017\u53f7\u5f53\u5c0f\u6570\u70b9&#xff09;\u3002\u8fd9\u79cd\u5199\u6cd5\u4e22\u7ed9 float() \u4f1a\u600e\u6837&#xff0c;\u4e0b\u4e00\u7bc7\u5355\u72ec\u8bb2&#xff0c;\u672c\u6587\u4e0d\u5c55\u5f00\u3002<\/li>\n<\/ul>\n<h3>\u5c0f\u7ed3<\/h3>\n<p>\u914d\u7f6e\u8868\u91cc\u628a\u4e00\u5343\u4e8c\u767e\u5199\u6210 1.200 \u4e4b\u540e&#xff0c;float() \u5f97\u5230\u7684\u662f 1.2&#xff0c;\u800c\u4e14\u4e0d\u62a5\u9519\u3002\u8fd9\u4e0d\u662f\u6587\u4ef6\u574f\u4e86&#xff0c;\u800c\u662f\u5b98\u65b9\u7684 float() \u628a\u70b9\u5f53\u4f5c\u5c0f\u6570\u70b9&#xff0c;\u5e76\u4e0d\u628a\u70b9\u5f53\u4f5c\u5343\u5206\u4f4d\u3002\u5b83\u548c\u4e0a\u4e00\u7bc7\u7684 1,200 \u4e0d\u4e00\u6837&#xff1a;\u5e26\u9017\u53f7\u7684\u6574\u6570\u4f1a\u7acb\u523b\u62a5\u9519&#xff0c;\u5e26\u70b9\u7684\u300c\u5343\u5206\u4f4d\u300d\u5374\u4f1a\u9759\u9ed8\u8bfb\u6210\u5c0f\u6570\u3002\u6392\u67e5\u65f6\u5148\u7528 repr() \u770b\u539f\u59cb\u5b57\u7b26\u4e32&#xff0c;\u518d\u7ea6\u5b9a\u8868\u91cc\u7684\u70b9\u5230\u5e95\u662f\u5c0f\u6570\u70b9\u8fd8\u662f\u5343\u5206\u4f4d&#xff1a;\u80fd\u6539\u6e90\u8868&#xff0c;\u6574\u6570\u5c31\u5199\u6210 1200 \u6216 1_200&#xff1b;\u65e7\u8868\u5df2\u7ecf\u786e\u8ba4\u70b9\u662f\u5343\u5206\u4f4d&#xff0c;\u518d\u53bb\u6389\u70b9\u540e\u4ea4\u7ed9 float()\u3002\u4e0d\u8981\u4e00\u89c1\u5230\u70b9\u5c31\u5220&#xff0c;\u4ee5\u514d\u628a\u5f53\u4f5c\u5c0f\u6570\u70b9\u7684\u5199\u6cd5\u4e5f\u53bb\u6389&#xff0c;\u5f97\u5230\u53e6\u4e00\u4e2a\u65b9\u5411\u7684\u9519\u8bef\u6570\u503c\u3002<\/p>\n<p>\u4f9d\u636e&#xff1a;Python \u5b98\u65b9\u6587\u6863 3.12 \u4e0e 3.13 \u7248\u5185\u7f6e\u51fd\u6570\u9875&#xff08;float \u5141\u8bb8\u7684\u5b57\u7b26\u4e32\u5f62\u5f0f&#xff0c;\u542b\u70b9\u4f5c\u4e3a\u5c0f\u6570\u70b9\u7684\u8bed\u6cd5&#xff0c;\u4ee5\u53ca 3.6 \u8d77\u5141\u8bb8\u4e0b\u5212\u7ebf\u5206\u7ec4&#xff09;\u548c string \u9875\u683c\u5f0f\u5316\u8ff7\u4f60\u8bed\u8a00&#xff08;grouping \u9009\u9879 &#039;,&#039; \u6bcf\u9694 3 \u4f4d\u63d2\u5165\u9017\u53f7&#xff09;&#xff08;docs.python.org\/3.12\/library\/functions.html \u3001docs.python.org\/3.12\/library\/string.html &#xff0c;2026-11-15 \u6838\u5bf9&#xff0c;\u5e76\u5bf9\u7167 3.13 \u540c\u540d\u9875&#xff0c;3.12 \u9875\u6807\u6ce8 3.12.16\u30013.13 \u9875\u6807\u6ce8 3.13.18&#xff09;&#xff1b;\u672c\u673a Python 3.12.15 \/ 3.13.5 \u5b9e\u6d4b\u3002\u793a\u4f8b\u548c\u8868\u8fbe\u539f\u521b\u3002<\/p>\n<p>\u4f60\u8fd9\u6b21\u8bfb\u5230\u7684 1.2&#xff0c;\u66f4\u591a\u662f\u300c\u8868\u91cc\u672c\u610f\u662f\u4e00\u5343\u4e8c\u767e&#xff0c;\u5374\u7528\u70b9\u5199\u6210\u4e86 1.200\u300d&#xff0c;\u8fd8\u662f\u300c\u8868\u91cc\u672c\u6765\u5c31\u662f\u5c0f\u6570 1.200&#xff0c;\u53ea\u662f\u548c\u5343\u5206\u4f4d\u5199\u6cd5\u770b\u8d77\u6765\u592a\u50cf\u300d&#xff1f;<\/p>\n<p>\u672c\u7cfb\u5217\u4e0b\u4e00\u7bc7\u8bb2\u914d\u7f6e\u8868\u91cc\u628a\u300c1,5\u300d\u8fd9\u79cd\u7528\u9017\u53f7\u5f53\u5c0f\u6570\u70b9\u7684\u5199\u6cd5\u4e22\u7ed9 float() \u65f6&#xff0c;\u4e3a\u4ec0\u4e48\u4f1a\u62a5\u9519&#xff0c;\u4ee5\u53ca\u600e\u6837\u5148\u7ea6\u5b9a\u5c0f\u6570\u70b9\u7b26\u53f7\u3002<\/p>\n<p>      <span id=\"quality-guide-article-end\" aria-hidden=\"true\" style=\"display:block;height:1px;margin-bottom:-1px\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[14278,81,248],"topic":[],"class_list":["post-124560","post","type-post","status-publish","format-standard","hentry","category-server","tag-14278","tag-python","tag-248"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u914d\u7f6e\u8868\u95ee\u9898\uff1a\u5199\u6210\u300c1.200\u300d\u540e float()\u53d8\u6210 1.2\uff1f\u65b0\u624b\u5148\u5206\u6e05\u70b9\u548c\u9017\u53f7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/124560.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u914d\u7f6e\u8868\u95ee\u9898\uff1a\u5199\u6210\u300c1.200\u300d\u540e float()\u53d8\u6210 1.2\uff1f\u65b0\u624b\u5148\u5206\u6e05\u70b9\u548c\u9017\u53f7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/124560.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-18T21:08:46+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/124560.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/124560.html\",\"name\":\"\u914d\u7f6e\u8868\u95ee\u9898\uff1a\u5199\u6210\u300c1.200\u300d\u540e float()\u53d8\u6210 1.2\uff1f\u65b0\u624b\u5148\u5206\u6e05\u70b9\u548c\u9017\u53f7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-11-18T21:08:46+00:00\",\"dateModified\":\"2026-11-18T21:08:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/124560.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/124560.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/124560.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u914d\u7f6e\u8868\u95ee\u9898\uff1a\u5199\u6210\u300c1.200\u300d\u540e float()\u53d8\u6210 1.2\uff1f\u65b0\u624b\u5148\u5206\u6e05\u70b9\u548c\u9017\u53f7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u914d\u7f6e\u8868\u95ee\u9898\uff1a\u5199\u6210\u300c1.200\u300d\u540e float()\u53d8\u6210 1.2\uff1f\u65b0\u624b\u5148\u5206\u6e05\u70b9\u548c\u9017\u53f7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/124560.html","og_locale":"zh_CN","og_type":"article","og_title":"\u914d\u7f6e\u8868\u95ee\u9898\uff1a\u5199\u6210\u300c1.200\u300d\u540e float()\u53d8\u6210 1.2\uff1f\u65b0\u624b\u5148\u5206\u6e05\u70b9\u548c\u9017\u53f7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content","og_url":"https:\/\/www.wsisp.com\/helps\/124560.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-11-18T21:08:46+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/124560.html","url":"https:\/\/www.wsisp.com\/helps\/124560.html","name":"\u914d\u7f6e\u8868\u95ee\u9898\uff1a\u5199\u6210\u300c1.200\u300d\u540e float()\u53d8\u6210 1.2\uff1f\u65b0\u624b\u5148\u5206\u6e05\u70b9\u548c\u9017\u53f7 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-11-18T21:08:46+00:00","dateModified":"2026-11-18T21:08:46+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/124560.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/124560.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/124560.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u914d\u7f6e\u8868\u95ee\u9898\uff1a\u5199\u6210\u300c1.200\u300d\u540e float()\u53d8\u6210 1.2\uff1f\u65b0\u624b\u5148\u5206\u6e05\u70b9\u548c\u9017\u53f7"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/124560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=124560"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/124560\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=124560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=124560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=124560"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=124560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}