1、创建 hello.py 文件,内容如下
def hello( a,b ):
print(a+b)
return a+b
if __name__ == '__main__':
hello(1, 2)
2、打开dos 窗口运行
python -c "from hello import hello;hello(1,2)"
输出结果 3
最后修改于 2020-09-17 17:32:32
如果觉得我的文章对你有用,请随意赞赏
扫一扫支付

