i = 0
i = i + 1
if i >= 5:
Is if statement executed before while statement?
And why isn't 5 printed because it's true as 5 is greater or equals to 5 so that's true so it should be printed
When 4 is printed,in the next line i value become 5 so if statement will execute and it will break out of the while loop. So value 5 is not printed. If you print the i value after while loop,it will be 5