Home
Python
2D
Application
Buildin Function
Class
Data Structure
Data Type
Database
Development
Dictionary
Event
Exception
File
Function
GUI Pmw
GUI Tk
Language Basics
List
Math
Network
String
System
Thread
Tuple
Utility
XML
For Statements : List Loop « List « Python
Python
List
List Loop
For Statements
a = [
'cat'
,
'window'
,
'defenestrate'
]
for
x in a: print x, len(x)
Related examples in the same category
1.
List for iteration
2.
Loop through a list: for in
3.
To iterate over the indices of a sequence, combine range() and len()
4.
For loop demo
5.
For loop for List