<div dir="ltr">Of course We needn't 100 levels,but I use the exec function can concise the code. See the attachment.<br><br>
<div class="gmail_quote">2008/8/17 Fredrik Lundh <span dir="ltr"><<a href="mailto:fredrik@pythonware.com">fredrik@pythonware.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">Nick Dumas wrote:<br><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">A good quote I read (I can't remember who it was from, though) is "If<br>you need more than three levels of indentation, then something is<br>
seriously wrong with your code." Possibly Guido himself? Anyway. If<br>you've got 100 levels of for, you're probably making things way harder<br>than they need to be.<br></blockquote><br></div>assuming 100 levels of for and 2 items in each sequence, you'll end up with 1267650600228229401496703205376 iterations through the inner loop.  assuming each iteration takes a picosecond, it'll take approx 40 billion years to run the program.<br>
<font color="#888888"><br></F></font> 
<div>
<div></div>
<div class="Wj3C7c"><br><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br></div></div></blockquote></div><br></div>