+ 1
i = 0 while 1==1: print(i) i = i + 1 if i >= 5: print("Breaking") break print("Finished")
what 1==1 in while tag represents?
3 Réponses
+ 2
what will happen if its false?
+ 2
ok
+ 1
it would print 0 1 2 3 4 5 breaking finished. the point of 1==1 is to make an infinite loop and then add a condition inside it to break it