GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing syntaxdb.com — For Loop in Python - SyntaxDB - Python Syntax Reference
LanguageVersion: 3.4.3Categories
Control FlowFor Loop in PythonThe for loop is used to iterate through a sequence. When a range is provided as the sequence, it behaves like a C-style for loop. For all other sequences (arrays, etc.), it behaves like a for each loop. SyntaxNotesA sequence can be a list, set, or range. The control structure takes an element from the sequence and executes the statements. It then continues to do the same on subsequent elements until there are no more elements in the sequence. Iteration through a range is done in numerical order. Iteration through a non-range sequence has no guarantee of order. Example
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |