Vidyalelo
Python · Q76

Python Loops and Conditionals: MCQs for Exam Readiness

Programming · Python · question 76

Q76

What will be the output of the following Python code? x = "abcdef" i = "a" while i in x: x = x[:-1] print(i, end = " ")

A.
i i i i i i
B.
a a a a a a
Answer
C.
a a a a a
D.
none of the mentioned

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board