python 解包、递归
时间:2021-05-04 15:37:45
收藏:0
阅读:0
解包:
d = {"username":"admin","password":"123456"}
print(d.items())
# [(‘username‘, ‘admin‘), (‘password‘, ‘123456‘)]
for k,v in d.items():
print(k,v)
递归
#函数自己调用自己,就是递归
count = 0
def test():
global count
count+=1
print("5.1快乐",count)
test()
test()
评论(0)