複数のListの同じインデックスの要素をタプルにまとめたリストを作れる。
listA = ["A","B","C","D","E"] listB = ["1","2","3"] result = zip(listA,listB) for r in result: print(r)
(‘A’,’1’) (‘B’,’2’) (‘C’,’3’)