Python's while loop is a more general sort of looping tool.
It's not limited to stepping across sequences, but generally requires more code to do so:
x = 4 while x > 0: # w w w . j a v a 2 s . co m print('test!' * x) x -= 1