もちろんwhileループだってある。
cnt = 0 while cnt < 10: print cnt if cnt >= 6: break cnt += 1
break を使えば途中でループを抜け出せる。 実行結果:
^o^ > python while.py 0 1 2 3 4 5 6