扫码关注官方订阅号
学习是最好的投资!
def test(): num = 0 num += 1 return num def test2(): new_num = test() print test()
可以直接引用函数名test(),或赋值给其他变量:new_num = test()。
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
可以直接引用函数名test(),或赋值给其他变量:new_num = test()。