python 解包、递归
2021-06-01 08:03
阅读:510
标签:for test global use glob ems item print dmi 递归 test() python 解包、递归 标签:for test global use glob ems item print dmi 原文地址:https://www.cnblogs.com/dengjinjiao/p/14725250.html解包:
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()
评论
亲,登录后才可以留言!