loops/quickref.tex
author Anoop Jacob Thomas<anoop@fossee.in>
Mon, 11 Oct 2010 14:02:36 +0530
changeset 288 a3b98b4c371e
parent 285 7c4855fb8e5f
permissions -rw-r--r--
added few questions for other-type-of-plots.

\textbf{loops}

To iterate over a sequence: \lstinline|for i in sequence:|\\
\texttt{i} is the looping variable. 

To iterate while a condition is true: \lstinline|while condition:|

Blocks in python are indented. To end block return to the previous
indentation. 

To break out of the innermost loop: \lstinline|break|

To skip to end of current iteration: \lstinline|continue|

\lstinline|pass| is just a syntactic filler.