On 2 September 2010 02:49, Alban Nona <span dir="ltr"><<a href="mailto:python.koda@gmail.com">python.koda@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Well what Iam trying to generate is that kind of result:<br><br>listn1=['ELM001_DIF', 'ELM001_SPC', 'ELM001_RFL', 'ELM001_SSS', 'ELM001_REFR', 
'ELM001_ALB', 'ELM001_AMB', 'ELM001_NRM', 'ELM001_MVE', 'ELM001_DPF', 
'ELM001_SDW', 'ELM001_MAT', 'ELM001_WPP']<br><br>listn2 = ['ELM002_DIF', 'ELM002_SPC', 'ELM002_RFL', 'ELM002_SSS', 'ELM002_REFR', 'ELM002_ALB', 'ELM002_AMB', 'ELM002_NRM', 'ELM002_MVE', 'ELM002_DPF', 'ELM002_SDW', 'ELM002_MAT', 'ELM002_WPP']<br>


<br>etc...<br></blockquote><div><br>Have a look at <a href="http://www.ideone.com/zlBeB">http://www.ideone.com/zlBeB</a> .<br>I took some liberty and renamed some of your variables. I wanted to show you what I (personally) think as good practices in python, from naming conventions to how to use the list and dictionary, and so on. Also, 4-spaces indent. I noticed you have 5 for some reason, but that's none of my business now. I hope my comments explain what they do, and why they are that way. <br>

</div><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">The thing is, the first list will be generated automatically. (so there will be unknow versions of ELM00x....)<br>

that why Im trying to figure out how to genere variable and list in an automatic way.<br></blockquote><div><br>Yes, that's totally possible. See<span style="font-family: courier new,monospace;"> range()</span> (and <span style="font-family: courier new,monospace;">xrange()</span>, possibly) in the Python API. <br>

</div></div>