摘要:
def calc(n): print(n) if int(n/2)== 0: return n res = calc(int(n/2)) return res calc(10) 结果: 10 5 2 1 阅读全文
摘要:
全局变量与局部变量调用 name = "你好" def weihu(): name = "天才" def kelian(): global name name = "帅哥" kelian() print(name) print(name) weihu() print(name) 结果: 你好 天才 帅哥 更换关键字:no... 阅读全文