Python中函数的定义及调用(1)
aa22.py
def fun
(x,y
):
if x
==y:
return x+y
else:
return None
print fun
(3,4
)
aa77.py调用aa22.py
from aa22
import fun
my_fun
= fun
(6,6
)
print my_fun
调用格式:
from 文件名
import 函数名
新定义xxx
= 调用函数
(x,x
)
print等使用新定义xxx
转载请注明原文地址:https://ipadbbs.8miu.com/read-27279.html