adplus-dvertising
frame-decoration

Question

What is the output of the following code?
l1=[10, 20, 30]
l2=[-10, -20, -30]
l3=[x+y for x, y in zip(l1, l2)]
l3

a.

Error

b.

0

c.

[-20, -60, -80]

d.

[0, 0, 0]

Posted under Python

Answer: (d).[0, 0, 0]

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 following code?