adplus-dvertising
frame-decoration

Question

What is the output of the following?
a = [0, 1, 2, 3]
for a[-1] in a:
    print(a[-1])

a.

0 1 2 3

b.

0 1 2 2

c.

3 3 3 3

d.

error

Posted under Python

Answer: (b).0 1 2 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