0
Is while 1==1 equal to while 2==2 and so on ?do all while x==x indicate the same thing?(x is integer)
2 Answers
+ 7
Yes. It's common to just say
while True:
[do stuff]
if [something]:
break
+ 3
Any integer compared with itself will be evaluated as True, as such passing that expression as loop condition will turn the loop into an infinite one, as the expression always evaluates to True (cmiiw)