author | Puneeth Chaganti <punchagan@fossee.in> |
Tue, 19 Oct 2010 14:26:29 +0530 | |
changeset 338 | e4a7d0924143 |
parent 285 | 7c4855fb8e5f |
permissions | -rw-r--r-- |
285 | 1 |
\textbf{loops} |
2 |
||
3 |
To iterate over a sequence: \lstinline|for i in sequence:|\\ |
|
4 |
\texttt{i} is the looping variable. |
|
5 |
||
6 |
To iterate while a condition is true: \lstinline|while condition:| |
|
217
b595f90016c5
Changed structure of my scripts.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
7 |
|
285 | 8 |
Blocks in python are indented. To end block return to the previous |
9 |
indentation. |
|
10 |
||
11 |
To break out of the innermost loop: \lstinline|break| |
|
217
b595f90016c5
Changed structure of my scripts.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
12 |
|
285 | 13 |
To skip to end of current iteration: \lstinline|continue| |
14 |
||
15 |
\lstinline|pass| is just a syntactic filler. |
|
16 |