<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # Python – 注釋 > 原文: [https://howtodoinjava.com/python/python-comments/](https://howtodoinjava.com/python/python-comments/) 在 Python(或任何其他編程語言)中,注釋用于解釋源代碼。 注釋描述了代碼,這有助于將來維護應用。 ```py # prints 4 print(2 + 2) print(2 + 3) # prints 5 """ prints the sum of two numbers which are 2 and 2 """ print(2 + 2) ``` ## Python 中的注釋類型 [Python](https://howtodoinjava.com/python-tutorial/) 支持編寫簡單的單行注釋以及多行注釋。 #### 單行注釋 一個簡單的單行注釋將以哈希(`#`)字符開頭。 Python 運行時會忽略在`#`字符之后編寫的任何文本,并將其視為注釋。 ```py # This is a simple comment print(2 + 2) print(2 + 3) # prints 5 ``` #### 多行注釋 Python 沒有什么特別的東西可以寫多行注釋。 要編寫它,我們可以編寫**多個單行注釋**。 我推薦這種形式的注釋。 ```py # This statement # prints the sum of # two numbers which are 2 and 2 print(2 + 2) ``` 我們可以利用未分配給變量的**多行字符串字面值**(使用*三引號*)。 Python 會忽略未分配給任何變量的字符串字面值,因此不會影響程序執行。 ```py """ This statement prints the sum of two numbers which are 2 and 2 """ print(2 + 2) ``` 將有關在 python 中編寫注釋的問題交給我。 學習愉快!
                  <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>

                              哎呀哎呀视频在线观看