摘要:
data = [[col for col in range(4)] for row in range(4)]'''[0,1,2,3][0,1,2,3][0,1,2,3][0,1,2,3] [0,0,0,0][1,1,1,1][2,2,2,2][3,3,3,3]'''for r_index,row i 阅读全文
摘要:
#例1装饰器def w1(main_func): def outer(request,kargs): print('before') main_func(request,kargs) print('after') return outer @w1def show(): print('show') # 阅读全文
摘要:
#递归实现def calc(n): print(n) if n/2 >1: res = calc(n/2) print('res:',res) print('N:',n) return n calc(100) #斐波那契数列def func(arg1,arg2,stop) if arg1 == 0: 阅读全文