关于map()与filter()
def f1(a): if a == 3: pass else: return a*a li = [1,2,3,4] for i in filret(f1,li)
print(i)
def f1(a): if a == 3: pass else: return a*a li = [1,2,3,4] # for i in filter(f1,li): # print(i) for i in map(f1,li): print(i)
def f1(a): if a == 3: pass else: return a*a li = [1,2,3,4] for i in filret(f1,li)
print(i)
def f1(a): if a == 3: pass else: return a*a li = [1,2,3,4] # for i in filter(f1,li): # print(i) for i in map(f1,li): print(i)