doc: update python.md (#297)

fix anchor link 3cec40c4f9
This commit is contained in:
jaywcjlove
2023-02-11 12:23:51 +00:00
parent f49e904a05
commit 789cdf3f7c
3 changed files with 121 additions and 119 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

View File

@ -164,7 +164,7 @@
</span><span class="code-line"><span class="token operator">>></span><span class="token operator">></span> <span class="token string-interpolation"><span class="token string">f'</span><span class="token interpolation"><span class="token punctuation">{</span>num<span class="token punctuation">}</span></span><span class="token string"> + 10 = </span><span class="token interpolation"><span class="token punctuation">{</span>num <span class="token operator">+</span> <span class="token number">10</span><span class="token punctuation">}</span></span><span class="token string">'</span></span> </span><span class="code-line"><span class="token operator">>></span><span class="token operator">></span> <span class="token string-interpolation"><span class="token string">f'</span><span class="token interpolation"><span class="token punctuation">{</span>num<span class="token punctuation">}</span></span><span class="token string"> + 10 = </span><span class="token interpolation"><span class="token punctuation">{</span>num <span class="token operator">+</span> <span class="token number">10</span><span class="token punctuation">}</span></span><span class="token string">'</span></span>
</span><span class="code-line"><span class="token string">'10 + 10 = 20'</span> </span><span class="code-line"><span class="token string">'10 + 10 = 20'</span>
</span></code></pre> </span></code></pre>
<p>查看: [Python F-Strings](#f-字符串(Python 3.6+))</p> <p>查看: <a href="#python-f-%E5%AD%97%E7%AC%A6%E4%B8%B2-%E8%87%AA-python-3-6-%E8%B5%B7">Python F-Strings</a></p>
</div></div></div></div></div><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="python-数据类型"><a aria-hidden="true" tabindex="-1" href="#python-数据类型"><span class="icon icon-link"></span></a>Python 数据类型</h2><div class="wrap-body"> </div></div></div></div></div><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="python-数据类型"><a aria-hidden="true" tabindex="-1" href="#python-数据类型"><span class="icon icon-link"></span></a>Python 数据类型</h2><div class="wrap-body">
</div></div><div class="h2wrap-body"><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="字符串"><a aria-hidden="true" tabindex="-1" href="#字符串"><span class="icon icon-link"></span></a>字符串</h3><div class="wrap-body"> </div></div><div class="h2wrap-body"><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="字符串"><a aria-hidden="true" tabindex="-1" href="#字符串"><span class="icon icon-link"></span></a>字符串</h3><div class="wrap-body">
<pre class="language-python"><code class="language-python code-highlight"><span class="code-line">hello <span class="token operator">=</span> <span class="token string">"Hello World"</span> <pre class="language-python"><code class="language-python code-highlight"><span class="code-line">hello <span class="token operator">=</span> <span class="token string">"Hello World"</span>

View File

@ -772,6 +772,9 @@
<a href="https://github.com/catcto" title="喵仙人"> <a href="https://github.com/catcto" title="喵仙人">
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="喵仙人"> <img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="喵仙人">
</a> </a>
<a href="https://github.com/Country-If" title="Maylon">
<img src="https://avatars.githubusercontent.com/u/62837275?v=4" width="42;" alt="Maylon">
</a>
<a href="https://github.com/13812700839" title="花殇"> <a href="https://github.com/13812700839" title="花殇">
<img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"> <img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇">
</a> </a>
@ -820,9 +823,6 @@
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"> <a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski">
<img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"> <img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski">
</a> </a>
<a href="https://github.com/Country-If" title="Maylon">
<img src="https://avatars.githubusercontent.com/u/62837275?v=4" width="42;" alt="Maylon">
</a>
<a href="https://github.com/Mo3et" title="Monet Lee"> <a href="https://github.com/Mo3et" title="Monet Lee">
<img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee"> <img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee">
</a> </a>
@ -1082,7 +1082,7 @@
<!--rehype:class=home-card home-links--> <!--rehype:class=home-card home-links-->
<p>如果你有资源,可以很方便<a href="https://github.com/jaywcjlove/reference/issues/102#issue-1451649637">部署 web 版</a>,这非常简单,只需要克隆 <a href="https://github.com/jaywcjlove/reference/tree/gh-pages">gh-pages</a> 分支代码到你的静态服务就可以了,还可以使用 <a href="https://hub.docker.com/r/wcjiang/reference">docker</a> 快捷部署 web 版。</p> <p>如果你有资源,可以很方便<a href="https://github.com/jaywcjlove/reference/issues/102#issue-1451649637">部署 web 版</a>,这非常简单,只需要克隆 <a href="https://github.com/jaywcjlove/reference/tree/gh-pages">gh-pages</a> 分支代码到你的静态服务就可以了,还可以使用 <a href="https://hub.docker.com/r/wcjiang/reference">docker</a> 快捷部署 web 版。</p>
</div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 Kenny Wang. Updated on 2023/02/11 20:16:13</footer></footer><script src="data.js" defer></script><script src="js/fuse.min.js" defer></script><script src="js/main.js" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18"> </div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 Kenny Wang. Updated on 2023/02/11 20:22:56</footer></footer><script src="data.js" defer></script><script src="js/fuse.min.js" defer></script><script src="js/main.js" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
<path fill="currentColor" d="M17.71,16.29 L14.31,12.9 C15.4069846,11.5024547 16.0022094,9.77665502 16,8 C16,3.581722 12.418278,0 8,0 C3.581722,0 0,3.581722 0,8 C0,12.418278 3.581722,16 8,16 C9.77665502,16.0022094 11.5024547,15.4069846 12.9,14.31 L16.29,17.71 C16.4777666,17.8993127 16.7333625,18.0057983 17,18.0057983 C17.2666375,18.0057983 17.5222334,17.8993127 17.71,17.71 C17.8993127,17.5222334 18.0057983,17.2666375 18.0057983,17 C18.0057983,16.7333625 17.8993127,16.4777666 17.71,16.29 Z M2,8 C2,4.6862915 4.6862915,2 8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 Z"></path> <path fill="currentColor" d="M17.71,16.29 L14.31,12.9 C15.4069846,11.5024547 16.0022094,9.77665502 16,8 C16,3.581722 12.418278,0 8,0 C3.581722,0 0,3.581722 0,8 C0,12.418278 3.581722,16 8,16 C9.77665502,16.0022094 11.5024547,15.4069846 12.9,14.31 L16.29,17.71 C16.4777666,17.8993127 16.7333625,18.0057983 17,18.0057983 C17.2666375,18.0057983 17.5222334,17.8993127 17.71,17.71 C17.8993127,17.5222334 18.0057983,17.2666375 18.0057983,17 C18.0057983,16.7333625 17.8993127,16.4777666 17.71,16.29 Z M2,8 C2,4.6862915 4.6862915,2 8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 Z"></path>
</svg><input id="mysearch-input" type="search" placeholder="搜索" autocomplete="off"><div class="mysearch-clear"></div></div><button id="mysearch-close" type="button">搜索</button></div><div class="mysearch-result"><div id="mysearch-menu"></div><div id="mysearch-content"></div></div></div></div></body> </svg><input id="mysearch-input" type="search" placeholder="搜索" autocomplete="off"><div class="mysearch-clear"></div></div><button id="mysearch-close" type="button">搜索</button></div><div class="mysearch-result"><div id="mysearch-menu"></div><div id="mysearch-content"></div></div></div></div></body>
</html> </html>