在def_function.py文件里面写
#coding=utf-8
#定义函数
def hello():
print "hello world"
在test.py里面调用
#coding=utf-8
from def_function import hello
#from def_function import * #导入该文件里的所有函数
#调用函数
hello()
在cmd下调用
在def_function.py文件里面写
#coding=utf-8
#定义函数
def hello():
print "hello world"
在test.py里面调用
#coding=utf-8
from def_function import hello
#from def_function import * #导入该文件里的所有函数
#调用函数
hello()
在cmd下调用
JAVA 两个类同时实现同一个接口
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M