Hello everyone kindly spends two minutes on this question. the question is from python I start the python program 4days back I just create one for loop code it gives its output but I had confusion on that. Please explain to me if anyone knows that.
The code was
w = [“blue”, “red”, “green”, “yellow”]
for i in w:
if i == “green”:
I break the statement in green. But why are the blue and red printed twice from my point of view I didn’t mention any range for that but it gives the output. Does anyone please explain to me the truth?.