1. <i id='cT20a'><tr id='cT20a'><dt id='cT20a'><q id='cT20a'><span id='cT20a'><b id='cT20a'><form id='cT20a'><ins id='cT20a'></ins><ul id='cT20a'></ul><sub id='cT20a'></sub></form><legend id='cT20a'></legend><bdo id='cT20a'><pre id='cT20a'><center id='cT20a'></center></pre></bdo></b><th id='cT20a'></th></span></q></dt></tr></i><div id='cT20a'><tfoot id='cT20a'></tfoot><dl id='cT20a'><fieldset id='cT20a'></fieldset></dl></div>

    2. <tfoot id='cT20a'></tfoot>
    3. <small id='cT20a'></small><noframes id='cT20a'>

    4. <legend id='cT20a'><style id='cT20a'><dir id='cT20a'><q id='cT20a'></q></dir></style></legend>
        <bdo id='cT20a'></bdo><ul id='cT20a'></ul>

        Python:这两个 import 语句有什么区别?

        Python: What is the difference between these two import statements?(Python:这两个 import 语句有什么区别?)
          <tbody id='ysnLf'></tbody>
        • <legend id='ysnLf'><style id='ysnLf'><dir id='ysnLf'><q id='ysnLf'></q></dir></style></legend>

          <i id='ysnLf'><tr id='ysnLf'><dt id='ysnLf'><q id='ysnLf'><span id='ysnLf'><b id='ysnLf'><form id='ysnLf'><ins id='ysnLf'></ins><ul id='ysnLf'></ul><sub id='ysnLf'></sub></form><legend id='ysnLf'></legend><bdo id='ysnLf'><pre id='ysnLf'><center id='ysnLf'></center></pre></bdo></b><th id='ysnLf'></th></span></q></dt></tr></i><div id='ysnLf'><tfoot id='ysnLf'></tfoot><dl id='ysnLf'><fieldset id='ysnLf'></fieldset></dl></div>
          <tfoot id='ysnLf'></tfoot>

          1. <small id='ysnLf'></small><noframes id='ysnLf'>

                <bdo id='ysnLf'></bdo><ul id='ysnLf'></ul>
                • 本文介绍了Python:这两个 import 语句有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在我看来,它们在功能上都一样.使用其中一种有什么区别和优势吗?

                  They both functionally looks same to me. Are there any differences and advantages of using one over another?

                  >>> from datetime import datetime, timedelta
                  >>> from datetime import (datetime, timedelta)
                  

                  推荐答案

                  如果你将导入包裹在括号中,如果你在导入语句中放置一个换行符,你就不必使用反斜杠来续行,即首选样式.在功能上,它们是相同的,如果在一行中,省略括号会更干净.

                  If you wrap the imports in parens, you don't have to use a backslash for line continuation if you put a line break in the import statement, which is the preferred style. Functionally, they are identical, and if on one line, leaving out the parens is cleaner.

                  这篇关于Python:这两个 import 语句有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)
                  Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)
                  Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)
                  Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)
                  Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)
                  Grouping pandas DataFrame by 10 minute intervals(按10分钟间隔对 pandas 数据帧进行分组)
                • <legend id='4Bzgb'><style id='4Bzgb'><dir id='4Bzgb'><q id='4Bzgb'></q></dir></style></legend>

                    <small id='4Bzgb'></small><noframes id='4Bzgb'>

                      1. <i id='4Bzgb'><tr id='4Bzgb'><dt id='4Bzgb'><q id='4Bzgb'><span id='4Bzgb'><b id='4Bzgb'><form id='4Bzgb'><ins id='4Bzgb'></ins><ul id='4Bzgb'></ul><sub id='4Bzgb'></sub></form><legend id='4Bzgb'></legend><bdo id='4Bzgb'><pre id='4Bzgb'><center id='4Bzgb'></center></pre></bdo></b><th id='4Bzgb'></th></span></q></dt></tr></i><div id='4Bzgb'><tfoot id='4Bzgb'></tfoot><dl id='4Bzgb'><fieldset id='4Bzgb'></fieldset></dl></div>
                        <tfoot id='4Bzgb'></tfoot>

                            <bdo id='4Bzgb'></bdo><ul id='4Bzgb'></ul>

                              <tbody id='4Bzgb'></tbody>