adplus-dvertising
frame-decoration

Question

What is the output of the code shown below?
l1=[2,4,6]
l2=[-2,-4,-6]
for i in zip(l1, l2):
              	print(i)

a.

2, -2
4, -4
6, -6

b.

[(2, -2), (4, -4), (6, -6)]

c.

(2, -2)
(4, -4)
(6, -6)

d.

[-4, -16, -36]

Posted under Lists in Python Python

Answer: (c).(2, -2)
(4, -4)
(6, -6)

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?