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

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](appetite.xhtml "1. 課前甜點") | - [上一頁](../whatsnew/changelog.xhtml "更新日志") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - $('.inline-search').show(0); | # Python 教程 Python 是一種易于學習又功能強大的編程語言。它提供了高效的高級數據結構,還有簡單有效的面向對象編程。Python 優雅的語法和動態類型,以及解釋型語言的本質,使它成為多數平臺上寫腳本和快速開發應用的理想語言。 Python 解釋器及豐富的標準庫以源碼或機器碼的形式提供,可以到 Python 官網 <https://www.python.org/> 免費獲取適用于各個主要系統平臺的版本,并可自由地分發。這個網站還包含許多免費第三方 Python 模塊、程序和工具以及附加文檔的發布頁面或鏈接。 Python 解釋器易于擴展,可以使用 C 或 C++(或者其他可以通過 C 調用的語言)擴展新的功能和數據類型。Python 也可用于可定制化軟件中的擴展程序語言。 這個教程非正式地介紹 Python 語言和系統的基本概念和功能。最好在閱讀的時候準備一個 Python 解釋器進行練習,不過所有的例子都是相互獨立的,所以這個教程也可以離線閱讀。 有關標準的對象和模塊,參閱 [Python 標準庫](../library/index.xhtml#library-index)。[Python 語言參考](../reference/index.xhtml#reference-index) 提供了更正式的語言參考。想要編寫 C 或者 C++ 擴展可以參考 [擴展和嵌入 Python 解釋器](../extending/index.xhtml#extending-index) 和 [Python/C API 參考手冊](../c-api/index.xhtml#c-api-index)。也有不少書籍深入講解Python 。 這個教程并沒有完整包含每一個功能,甚至常用功能可能也沒有全部涉及。這個教程只介紹 Python 中最值得注意的功能,也會讓你體會到這個語言的風格特色。學習完這個教程,你將可以閱讀和編寫 Python 模塊和程序,也可以開始學習更多的 Python 庫模塊,詳見 [Python 標準庫](../library/index.xhtml#library-index)。 [術語對照表](../glossary.xhtml#glossary) 也很值得閱讀一下。 - [1. 課前甜點](appetite.xhtml) - [2. 使用 Python 解釋器](interpreter.xhtml) - [2.1. 調用解釋器](interpreter.xhtml#invoking-the-interpreter) - [2.1.1. 傳入參數](interpreter.xhtml#argument-passing) - [2.1.2. 交互模式](interpreter.xhtml#interactive-mode) - [2.2. 解釋器的運行環境](interpreter.xhtml#the-interpreter-and-its-environment) - [2.2.1. 源文件的字符編碼](interpreter.xhtml#source-code-encoding) - [3. Python 的非正式介紹](introduction.xhtml) - [3.1. Python 作為計算器使用](introduction.xhtml#using-python-as-a-calculator) - [3.1.1. 數字](introduction.xhtml#numbers) - [3.1.2. 字符串](introduction.xhtml#strings) - [3.1.3. 列表](introduction.xhtml#lists) - [3.2. 走向編程的第一步](introduction.xhtml#first-steps-towards-programming) - [4. 其他流程控制工具](controlflow.xhtml) - [4.1. `if` 語句](controlflow.xhtml#if-statements) - [4.2. `for` 語句](controlflow.xhtml#for-statements) - [4.3. `range()` 函數](controlflow.xhtml#the-range-function) - [4.4. `break` 和 `continue` 語句,以及循環中的 `else` 子句](controlflow.xhtml#break-and-continue-statements-and-else-clauses-on-loops) - [4.5. `pass` 語句](controlflow.xhtml#pass-statements) - [4.6. 定義函數](controlflow.xhtml#defining-functions) - [4.7. 函數定義的更多形式](controlflow.xhtml#more-on-defining-functions) - [4.7.1. 參數默認值](controlflow.xhtml#default-argument-values) - [4.7.2. 關鍵字參數](controlflow.xhtml#keyword-arguments) - [4.7.3. 任意的參數列表](controlflow.xhtml#arbitrary-argument-lists) - [4.7.4. 解包參數列表](controlflow.xhtml#unpacking-argument-lists) - [4.7.5. Lambda 表達式](controlflow.xhtml#lambda-expressions) - [4.7.6. 文檔字符串](controlflow.xhtml#documentation-strings) - [4.7.7. 函數標注](controlflow.xhtml#function-annotations) - [4.8. 小插曲:編碼風格](controlflow.xhtml#intermezzo-coding-style) - [5. 數據結構](datastructures.xhtml) - [5.1. 列表的更多特性](datastructures.xhtml#more-on-lists) - [5.1.1. 列表作為棧使用](datastructures.xhtml#using-lists-as-stacks) - [5.1.2. 列表作為隊列使用](datastructures.xhtml#using-lists-as-queues) - [5.1.3. 列表推導式](datastructures.xhtml#list-comprehensions) - [5.1.4. 嵌套的列表推導式](datastructures.xhtml#nested-list-comprehensions) - [5.2. `del` 語句](datastructures.xhtml#the-del-statement) - [5.3. 元組和序列](datastructures.xhtml#tuples-and-sequences) - [5.4. 集合](datastructures.xhtml#sets) - [5.5. 字典](datastructures.xhtml#dictionaries) - [5.6. 循環的技巧](datastructures.xhtml#looping-techniques) - [5.7. 深入條件控制](datastructures.xhtml#more-on-conditions) - [5.8. 序列和其它類型的比較](datastructures.xhtml#comparing-sequences-and-other-types) - [6. 模塊](modules.xhtml) - [6.1. 有關模塊的更多信息](modules.xhtml#more-on-modules) - [6.1.1. 以腳本的方式執行模塊](modules.xhtml#executing-modules-as-scripts) - [6.1.2. 模塊搜索路徑](modules.xhtml#the-module-search-path) - [6.1.3. “編譯過的”Python文件](modules.xhtml#compiled-python-files) - [6.2. 標準模塊](modules.xhtml#standard-modules) - [6.3. `dir()` 函數](modules.xhtml#the-dir-function) - [6.4. 包](modules.xhtml#packages) - [6.4.1. 從包中導入 \*](modules.xhtml#importing-from-a-package) - [6.4.2. 子包參考](modules.xhtml#intra-package-references) - [6.4.3. 多個目錄中的包](modules.xhtml#packages-in-multiple-directories) - [7. 輸入輸出](inputoutput.xhtml) - [7.1. 更漂亮的輸出格式](inputoutput.xhtml#fancier-output-formatting) - [7.1.1. 格式化字符串文字](inputoutput.xhtml#formatted-string-literals) - [7.1.2. 字符串的 format() 方法](inputoutput.xhtml#the-string-format-method) - [7.1.3. 手動格式化字符串](inputoutput.xhtml#manual-string-formatting) - [7.1.4. 舊的字符串格式化方法](inputoutput.xhtml#old-string-formatting) - [7.2. 讀寫文件](inputoutput.xhtml#reading-and-writing-files) - [7.2.1. 文件對象的方法](inputoutput.xhtml#methods-of-file-objects) - [7.2.2. 使用 `json` 保存結構化數據](inputoutput.xhtml#saving-structured-data-with-json) - [8. 錯誤和異常](errors.xhtml) - [8.1. 語法錯誤](errors.xhtml#syntax-errors) - [8.2. 異常](errors.xhtml#exceptions) - [8.3. 處理異常](errors.xhtml#handling-exceptions) - [8.4. 拋出異常](errors.xhtml#raising-exceptions) - [8.5. 用戶自定義異常](errors.xhtml#user-defined-exceptions) - [8.6. 定義清理操作](errors.xhtml#defining-clean-up-actions) - [8.7. 預定義的清理操作](errors.xhtml#predefined-clean-up-actions) - [9. 類](classes.xhtml) - [9.1. 名稱和對象](classes.xhtml#a-word-about-names-and-objects) - [9.2. Python 作用域和命名空間](classes.xhtml#python-scopes-and-namespaces) - [9.2.1. 作用域和命名空間示例](classes.xhtml#scopes-and-namespaces-example) - [9.3. 初探類](classes.xhtml#a-first-look-at-classes) - [9.3.1. 類定義語法](classes.xhtml#class-definition-syntax) - [9.3.2. 類對象](classes.xhtml#class-objects) - [9.3.3. 實例對象](classes.xhtml#instance-objects) - [9.3.4. 方法對象](classes.xhtml#method-objects) - [9.3.5. 類和實例變量](classes.xhtml#class-and-instance-variables) - [9.4. 補充說明](classes.xhtml#random-remarks) - [9.5. 繼承](classes.xhtml#inheritance) - [9.5.1. 多重繼承](classes.xhtml#multiple-inheritance) - [9.6. 私有變量](classes.xhtml#private-variables) - [9.7. 雜項說明](classes.xhtml#odds-and-ends) - [9.8. 迭代器](classes.xhtml#iterators) - [9.9. 生成器](classes.xhtml#generators) - [9.10. 生成器表達式](classes.xhtml#generator-expressions) - [10. 標準庫簡介](stdlib.xhtml) - [10.1. 操作系統接口](stdlib.xhtml#operating-system-interface) - [10.2. 文件通配符](stdlib.xhtml#file-wildcards) - [10.3. 命令行參數](stdlib.xhtml#command-line-arguments) - [10.4. 錯誤輸出重定向和程序終止](stdlib.xhtml#error-output-redirection-and-program-termination) - [10.5. 字符串模式匹配](stdlib.xhtml#string-pattern-matching) - [10.6. 數學](stdlib.xhtml#mathematics) - [10.7. 互聯網訪問](stdlib.xhtml#internet-access) - [10.8. 日期和時間](stdlib.xhtml#dates-and-times) - [10.9. 數據壓縮](stdlib.xhtml#data-compression) - [10.10. 性能測量](stdlib.xhtml#performance-measurement) - [10.11. 質量控制](stdlib.xhtml#quality-control) - [10.12. 自帶電池](stdlib.xhtml#batteries-included) - [11. 標準庫簡介 —— 第二部分](stdlib2.xhtml) - [11.1. 格式化輸出](stdlib2.xhtml#output-formatting) - [11.2. 模板](stdlib2.xhtml#templating) - [11.3. 使用二進制數據記錄格式](stdlib2.xhtml#working-with-binary-data-record-layouts) - [11.4. 多線程](stdlib2.xhtml#multi-threading) - [11.5. 日志](stdlib2.xhtml#logging) - [11.6. 弱引用](stdlib2.xhtml#weak-references) - [11.7. 用于操作列表的工具](stdlib2.xhtml#tools-for-working-with-lists) - [11.8. 十進制浮點運算](stdlib2.xhtml#decimal-floating-point-arithmetic) - [12. 虛擬環境和包](venv.xhtml) - [12.1. 概述](venv.xhtml#introduction) - [12.2. 創建虛擬環境](venv.xhtml#creating-virtual-environments) - [12.3. 使用pip管理包](venv.xhtml#managing-packages-with-pip) - [13. 接下來?](whatnow.xhtml) - [14. 交互式編輯和編輯歷史](interactive.xhtml) - [14.1. Tab 補全和編輯歷史](interactive.xhtml#tab-completion-and-history-editing) - [14.2. 默認交互式解釋器的替代品](interactive.xhtml#alternatives-to-the-interactive-interpreter) - [15. 浮點算術:爭議和限制](floatingpoint.xhtml) - [15.1. 表示性錯誤](floatingpoint.xhtml#representation-error) - [16. 附錄](appendix.xhtml) - [16.1. 交互模式](appendix.xhtml#interactive-mode) - [16.1.1. 錯誤處理](appendix.xhtml#error-handling) - [16.1.2. 可執行的Python腳本](appendix.xhtml#executable-python-scripts) - [16.1.3. 交互式啟動文件](appendix.xhtml#the-interactive-startup-file) - [16.1.4. 定制模塊](appendix.xhtml#the-customization-modules) ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](appetite.xhtml "1. 課前甜點") | - [上一頁](../whatsnew/changelog.xhtml "更新日志") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - $('.inline-search').show(0); | ? [版權所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 軟件基金會是一個非盈利組織。 [請捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [發現了問題](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 創建。
                  <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>

                              哎呀哎呀视频在线观看