test1文件夹里有一个t1文件
t1文件里有一个add()函数
另一个文件要引入add()函数并使用
体会from 与 import
from test1 import t1
print(t1.add())
from t1 import add
print(add())
test1文件夹里有一个t1文件
t1文件里有一个add()函数
另一个文件要引入add()函数并使用
体会from 与 import
from test1 import t1
print(t1.add())
from t1 import add
print(add())