adplus-dvertising
frame-decoration

Question

What is the output of the following code?
num = ['One', 'Two', 'Three']
for i, x in enumerate(num):
    print('{}: {}'.format(i, x),end=" ")

a.

1: 2: 3:

b.

Exception is thrown

c.

One Two Three

d.

0: One 1: Two 2: Three

Posted under Python

Answer: (d).0: One 1: Two 2: Three

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?