yester

关于 import 的�结,以 time 模�为例:

1�将整个模�导入,例如:import time,在引用时格�为:time.sleep(1)。

2�将整个模�中全部函数导入,例如:from time import *,在引用时格�为:sleep(1)。

3�将模�中特定函数导入,例如:from time import sleep,在引用时格�为:sleep(1)。

4�将模��个别�,例如:import time as abc,在引用时格�为:abc.sleep(1)。