Python/List: Difference between revisions
< Python
Jump to navigation
Jump to search
(Created page with "<source lang="python"> for idx, val in enumerate(ints): print(idx, val) </source>") |
No edit summary |
||
| Line 1: | Line 1: | ||
{| class="wikitable" | |||
! TODO || Code | |||
|- | |||
| List with indices. || | |||
<source lang="python"> | <source lang="python"> | ||
for idx, | for idx, item in enumerate(items): | ||
print(idx, val) | print(idx, val) | ||
|} | |||
</source> | </source> | ||
Revision as of 09:35, 5 June 2018
| TODO | Code |
|---|---|
| List with indices. |
for idx, item in enumerate(items):
print(idx, val)
|}
|