递归函数 特点: 必须有明确的结束条件 每次递归应比上一次的规模小 效率不高 1 def calc(n): 2 print(n) 3 if int(n/2) > 0: 4 return calc(int(n/2)) 5 print("==>", n) 6 7 calc(1024)