摘要:
希尔排序 描述: 原理: 时间复杂度: 稳定性: 不稳定 希尔排序演示: 代码实现: 简洁版: def Shell_sort(L): n = len(L) step = len(L) // 2 while step > 0: for i in range(step, n): while i >= s 阅读全文
摘要:
第八章: 模块, 包 与 分发描述:大型Python程序以模块和包的形式组织。另外,Python标准库中包含大量模块。本章详细介绍模块和包系统。还将提供有关如何安装第三方模块和分发源代码的信息。8.1模块与import语句任何Python源文件都能以模块的形式使用。例如,考虑以下代码:# spam.py a = 37 def foo (): print("I'm foo and a is ... 阅读全文