Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following Python code?
x = “abcdef”
while i in x:
print(i, end=” “)

What will be the output of the following Python code?
x = “abcdef”
while i in x:
print(i, end=” “)
a) a b c d e f
b) abcdef
c) i i i i i i …
d) error

Answer: d
Explanation: NameError, i is not defined.

Join The Discussion