A while-loop will keep executing the code block under it as long as a boolean expression is True. Ready To Learn To Code? If you enjoyed the sample so far, then you can continue learning by purchasing Learn Python 2 The Hard Way, or Buying Learn Python 3