adplus-dvertising
frame-decoration

Question

What is the output of the following?
x = "abcdef"
i = "a"
while i in x:
    x = x[1:]
    print(i, end = " ")

a.

a a a a a a

b.

a

c.

no output

d.

error

Posted under Python

Answer: (b).a

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