News Ticker

Menu

Understanding For Loop In Python



A loop statement is important to execute a statement or group of statements more than one time. You can use the for loop in Python to iterate over an iterable objects. In programming iterating over a sequence process is called as traversal. The loop executes a sequence of statements multiple times and abbreviates the code that manages the loop variable.

A for loop can also have an optional else block. The else part is executed if the items in the sequence used in for loop exhausts. break statement can be used to stop a for loop. In such case, the else part is ignored.







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 " Understanding For 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