[Tutor] Usage of for loop
raghavendra.gv.vanam at gmail.com
Mon Jan 5 14:19:47 CET 2009
i am beginner to this python language and slowing learning the language by
referring docs.I am trying to understand the for loop i.e., usage of for
loop in python,unlike c where i can give condition in python it is simple
iterating over sequence.
I am trying tounderstand the below lines of code but of no avail.
a = ["cat", "window","defenestrate"]
for x in a:
print x, len(x)
i cant understand what x is doing here and what is the purpose of it
can anyone help me out here?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor