借助lambda filter 12345678def foo(a, b, c): return a < b and b < cmyTuple = (1, 2, 3, 4, 5, 6)# 找到大于1,小于4的值print(list(filter(lambda x: foo(1, x, 4), myTuple)))# (2, 3) map 12345678910def func(x, y): print(x, y) return x + ya = [1, 2]data = list(map(lambda x: func(x, 88), a))print(data)# 1 88# 2 8# [89, 90]