Below is a piece of code from Python which has been bothering me for a while.
var=0
while (var <1 or var>100):
var=raw_input('Enter the block number ')
if (var >=1 and var<=100):
print '\nBlock Number : ',var
else:
print 'ERROR!!! Enter again.'
The problem is that the while loop iterates continuously without breaking. Can anyone help me how to break the loop.
Is there any way to implement a do..while in Python?