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

Hương Trang

New member
What will be the output of the following Python code?
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
C. a a a a a
D. none of the mentioned
 

Tìm kiếm

Back
Top