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
  • 35,525
  • 9
  • 94
  • 135
Mehvix
  • 169
  • 2
  • 12

1 Answers1

5

Use zip:

list(zip(listA,listB,listC))

[('A', '1', '!'), ('B', '2', '@'), ('C', '3', '#')]
sacuL
  • 45,929
  • 8
  • 75
  • 99