0
listA = ["A", "B", "C"]

listB = ["1", "2", "3"]

listC = ["!", "@", "#"]

If I have these lists, how would I get a new list of

[("A", "1", "!"), ("B", "2", "@"), ("!", "@", "#")]
Aran-Fey
  • 39,665
  • 11
  • 104
  • 149
Mehvix
  • 296
  • 3
  • 12

1 Answers1

5

Use zip:

list(zip(listA,listB,listC))

[('A', '1', '!'), ('B', '2', '@'), ('C', '3', '#')]
sacuL
  • 49,704
  • 8
  • 81
  • 106