一道Python面试题的几种解答: 两个元祖T1=(‘a’, ‘b’), T2=(‘c’, ‘d’),请使用匿名函数将其转变成[{‘a’: ‘c’}, {‘b’: ‘d’}] 方法一: >>> T1 = ('a', 'b') >>> T2 = ('c', 'd') >>> list(map(lambda x:{x[0]:x[1]}, zip(T1, T2))) [{'a': 'c'}, {'b': 'd'}] 方法二: >>> T1 = ('a', 'b') >>> T2 = ('c', 'd') >>> [{v1:v2} for (i1,v1) in enumerate(T1) for