首页 > 其他 > 详细

函数返回值

时间:2018-11-06 13:19:19      阅读:84      评论:0      收藏:0      [点我收藏+]
def test1():
print(‘in the test1‘)
def test2():
print(‘in the test2‘)
return 0
def test3():
print(‘in the test3‘)
return 1,‘hello‘,[‘alex‘,‘wupeiqi‘],{‘name‘:‘alex‘}
#return test2#返回test2内存地址

x=test1()
y=test2()
z=test3()
print(x)
print(y)
print(z)

in the test1
in the test2
in the test3
None
0
(1, ‘hello‘, [‘alex‘, ‘wupeiqi‘], {‘name‘: ‘alex‘})

函数返回值

原文:https://www.cnblogs.com/rongye/p/9914412.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!