函数【Python】


# 函数案例
# def test(x):
# y=2*x+1
# return (y)
# print y

# 总结:
# 返回值数=0 返回none
#
# 返回值数=1 返回object
#
# 返回值数=0 返回tuple(元祖)

# 函数参数
# def cal(x,y):
# res=x**y
# return res
# res=cal(2,3)
# print(res)
posted @ 2018-10-15 17:32  火虎true(false)  阅读(192)  评论(0编辑  收藏  举报