What will be the output of the following Python code?
i = 0
while i < 5:
print(i)
i += 1
if i == 3:
break
else:
print(0)
i = 0
while i < 5:
print(i)
i += 1
if i == 3:
break
else:
print(0)A. 0 1 2 0
B. 0 1 2
C. error
D. none of the mentioned
Answer: Option B

Join The Discussion