(lambda x: x)("hi")(lambda :2**3)()(lambda x: x % 10)(123)
map 函数
map(lambda x: x + x, "abcde")map(lambda x, y: x + y, range(0, 8), range(0, 8))map(None, range(3), range(10, 13))b = map(lambda x: x ** 2, range(4))
print ba = [0, 6, 12, 18]
print map(lambda x, y: (x * y), a, b)def f1():l = []map(lambda x: l.append(x), xrange(1, 11))return l
print f1()
reduce 函数
r = reduce(lambda x, y: x + y, range(101))
reduce(lambda x, y: x + y, range(1, 100, 20))print r
filter函数
def f(x):return x % 2 != 0 and x % 3 != 0print filter(f, range(2, 10))a = filter(lambda x: x % 2 == 0, range(0, 20, 3))
print adef f2(x):return x != 'a'filter(f2, "writaline")