立即学习:https://edu.csdn.net/course/play/24797/282178?utm_source=blogtoedu
多返回值,本质是返回元组
def test():
c1=chr(random.randiant(30,40))
随机字符
c2=chr(random.randiant(30,40))
c3=chr(random.randiant(30,40))
return(c1,c2,c3)
print(test())
#执行自动解包
多返回值函数,即可用多个变量来接受返回值,也可以用单个变量来接收返回值
c1,c2,c3=test()
print(c1)
print(c2)
print(c3)
test(a,*b)
print(c1,c2)
#a里面会只有第一个返回值,其他以列
表形态存在b里面
递归函数:函数递归包含了一种隐形循环
要知道结束点在哪里,保证递归的方向要朝着递归点趋近,不然会形成无线递归@@@@@