一.zip函数:接受任意多个(包括0个和1个)序列作为参数,返回一个tuple列表. 1.示例1: x = [1, 2, 3] y = [4, 5, 6] z = [7, 8, 9] xyz = zip(x, y, z) print xyz 运行的结果是: [(1, 4, 7), (2, 5, 8), (3, 6, 9)] 从这个结果可以看出zip函数的基本运作方式. 2.示例2: x = [1, 2, 3] y = [4, 5, 6, 7] xy = zip(x, y) print xy 运行…