12 2015 档案
摘要:1 def square_add(func): 2 def new_function1(*args, **kwargs): 3 result = func(*args, **kwargs) 4 return result ** 2 5 return ...
阅读全文
摘要:1 def triangles():2 c = [1]3 while 1:4 yield c5 a,b=[0]+c,c+[0]6 c=[a[i]+b[i] for i in range(len(a))]1 n = 02 for t in...
阅读全文
摘要:先上用Python写的十进制转二进制的函数代码: 1 def Dec2Bin(dec): 2 result = '' 3 4 if dec: 5 result = Dec2Bin(dec//2) 6 return result + str(d...
阅读全文

浙公网安备 33010602011771号