adplus-dvertising
frame-decoration

Question

What is the output of the following?
x = (i for i in range(3))
for i in x:
    print(i)

a.

0 1 2

b.

error

c.

0 1 2 0 1 2

d.

none of the mentioned

Posted under Python

Answer: (a).0 1 2

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?

Similar Questions

Discover Related MCQs