python3.4中怎么导入

2024-08-09 16:33:04
推荐回答(2个)
回答1:

在test.py中import test,运行

输出尘歼的派雹冲结果是:
This is a test
说明,在import这个package的时候,该类自动就实例肆御化了, 这样, 对于你的问题,应该直接调用就好~

回答2:

import xxx
from xxx import xxx