News Ticker

Menu

While Loop In Python



Every programming languages provide different control structures. This can be useful for more complicated execution paths. The while loop in Python is used to iterate over a block of code as long as the test expression (condition) is true. 

A while loop repeats a statement or group of statements while a given condition is TRUE. It tests the condition before executing the loop body. In Python, the body of the while loop is determined through indentation. Body starts with indentation and the first unindented line marks the end. Python interprets any non-zero value as True. None and 0 are interpreted as False.




Share This:

Uncle Noobee

Uncle Noobee - Editor of Noobsquare.com , loves science and technology specially internet. Sees internet as the largest university with millions of students. Every students have rights to learn their own subject and to master it.

No Comment to " While Loop In Python "

  • To add an Emoticons Show Icons
  • To add code Use [pre]code here[/pre]
  • To add an Image Use [img]IMAGE-URL-HERE[/img]
  • To add Youtube video just paste a video link like http://www.youtube.com/watch?v=0x_gnfpL3RM