adplus-dvertising
frame-decoration

Question

What is the output of the code shown below?
l1=[1,2,3]
l2=[4,5,6]
l3=[7,8,9]
for x, y, z in zip(l1, l2, l3):
            	print(x, y, z)

a.

1 4 7
2 5 8
3 6 9

b.

(1 4 7)
(2 5 8)
(3 6 9)

c.

[(1, 4, 7), (2, 5, 8), (3, 6, 9)]

d.

Error

Posted under Python

Answer: (a).1 4 7
2 5 8
3 6 9

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the code shown below?