I'm having trouble with my assignment. The requirement is
listA = ["a","b","c"]
listB = [1,2,3]
listC = [4,5,6]
I need to print out the list of tuples as in the following form:
[("a",(1,4)),("b",(2,5)),("c",(3,6))]
Here is what I've done:
a = ["a","b","c"]
b = [1,2,3]
c = [4,5,6]
bc = list(zip(b,c))
abc = list(zip(a,bc))
print(abc)
The output of my code is:
[('a', (1, 4)), ('b', (2, 5)), ('c', (3, 6))]
I'm not sure that my code is correct because it has a little difference between my output and the requirement's output. My output is 'a', 'b', 'c' instead of "a", "b", "c". Can anyone give me some idea, please?