摘要:
# 这段代码 def calc(n): return n**n print(calc(10)) # 改为匿名函数 calc = lambda n:n**n print(calc(10)) # 格式: 函数名 = lambda 参数:返回值 dic = {'k1':10,'k2':100,'k3':3 阅读全文
摘要:
# # zip 拉链方法 # l = [1,2,3] # l2 = ['a','b','c'] # l3 = ('*','**',[1,2]) # d = {'k1':1,'k2':2,'k3':3} # for i in zip(l,l2,l3,d): # print(i) # # # filte 阅读全文