<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 1\. 注釋的引入 ### 1.1. 看以下程序示例(未使用注釋) ![![使用注釋](../Images/01-第1天-1.gif)](images/screenshot_1593858043332.png) ### 1.2. 看以下程序示例(使用注釋) ![](https://img.kancloud.cn/6f/2f/6f2f09b185bf53790dd95b1e20cf8ca5_1194x788.png) ### 1.3. 小總結(注釋的概念和作用) * 注釋:在程序代碼中對程序代碼進行解釋說明的文字。 * 作用:注釋不是程序,不能被執行,只是對程序代碼進行解釋說明,讓別人可以看懂程序代碼的作用,能夠大大增強程序的可讀性。 ## 2\. 注釋的分類 ### 2.1. 單行注釋 以#開頭,#右邊的所有文字當作說明,而不是真正要執行的程序,起輔助說明作用 ~~~ # 我是注釋,可以在里寫一些功能說明之類的哦 print('hello world') ~~~ ### 2.2. 多行注釋 ~~~ ''' 我是多行注釋,可以寫很多很多行的功能說明 下面的代碼完成 ,打印一首詩 名字叫做:春江花月夜 ''' print('╔═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╤═╗') print('║ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ║') print('║ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ║') print('║ │春│滟│江│空│江│江│人│不│白│誰│可│玉│此│鴻│昨│江│斜│不│ ║') print('║ │江│滟│流│里│天│畔│生│知│云│家│憐│戶│時│雁│夜│水│月│知│ ║') print('║ │潮│隨│宛│流│一│何│代│江│一│今│樓│簾│相│長│閑│流│沉│乘│ ║') print('║ │水│波│轉│霜│色│人│代│月│片│夜│上│中│望│飛│潭│春│沉│月│ ║') print('║ │連│千│繞│不│無│初│無│待│去│扁│月│卷│不│光│夢│去│藏│幾│ ║') print('║春│海│萬│芳│覺│纖│見│窮│何│悠│舟│徘│不│相│不│落│欲│海│人│ ║') print('║江│平│里│甸│飛│塵│月│已│人│悠│子│徊│去│聞│度│花│盡│霧│歸│ ║') print('║花│,│,│,│,│,│,│,│,│,│,│,│,│,│,│,│,│,│,│ ║') print('║月│海│何│月│汀│皎│江│江│但│青│何│應│搗│愿│魚│可│江│碣│落│ ║') print('║夜│上│處│照│上│皎│月│月│見│楓│處│照│衣│逐│龍│憐│潭│石│月│ ║') print('║ │明│春│花│白│空│何│年│長│浦│相│離│砧│月│潛│春│落│瀟│搖│ ║') print('║ │月│江│林│沙│中│年│年│江│上│思│人│上│華│躍│半│月│湘│情│ ║') print('║ │共│無│皆│看│孤│初│望│送│不│明│妝│拂│流│水│不│復│無│滿│ ║') print('║ │潮│月│似│不│月│照│相│流│勝│月│鏡│還│照│成│還│西│限│江│ ║') print('║ │生│明│霰│見│輪│人│似│水│愁│樓│臺│來│君│文│家│斜│路│樹│ ║') print('║ │。│。│。│。│。│?│。│。│。│?│。│。│。│。│。│。│。│。│ ║') print('║ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ║') print('║ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ║') print('╚═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╧═╝') ~~~ ### 2.3. python程序中,中文支持 python3中,是默認支持中文的,但是在python2中就需要一定的額外操作才可以 python2中,如果直接在程序中用到了中文,比如 ~~~ print('你好') ~~~ 如果直接運行輸出,程序會出錯: ![](https://img.kancloud.cn/aa/fd/aafde87420e5372eb372aa550de575c0_1165x64.png) 解決的辦法為:在程序的開頭寫入如下代碼,這就是中文注釋 ~~~ #coding=utf-8 ~~~ 修改之后的程序: ~~~ #coding=utf-8 print('你好') ~~~ 運行結果: ~~~ 你好 ~~~ #### 注意: 在python的語法規范中推薦使用的方式: ~~~ # -*- coding:utf-8 -*- ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看