nesting for statements?

freeh (sent by Nabble.com) lists at nabble.com
Fri Jan 6 17:24:35 EST 2006


this seems you are finding tough time to solve a rather easy prob, just use the following idea:

L=3
a=1
while a <L:
                b=1
	while b<L:
                                c=1
		while c<L:
                                                name = chr(ord('a') + c)
			print a, b, c, name			
                                                c=c+1               
		b=b+1
                 a=a+1
print 'End'


This example gives an idea about how you run nested loops and create automatically generated file names inside a loop.

If you still don't get it, I can just write you the exact code you need,

cheers!

--
View this message in context: http://www.nabble.com/nesting-for-statements--t626966.html#a2248328
Sent from the Python - python-list forum at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060106/50cc63db/attachment.html>


More information about the Python-list mailing list