2020-04-24
2020-04-28 本文已影响0人
价值投机168
1.import hello #即包含了hello的模块
2.使用dir(hello) #就可以查看这个模块的哪些变量可以使用
3.from hello import ttt #这个就是,从hello模块中得到变量ttt的引用,并且可以直接使用ttt变量
1.import hello #即包含了hello的模块
2.使用dir(hello) #就可以查看这个模块的哪些变量可以使用
3.from hello import ttt #这个就是,从hello模块中得到变量ttt的引用,并且可以直接使用ttt变量