Dumb Stupid Question About List and String
python.koda at gmail.com
Wed Sep 1 18:49:57 CEST 2010
Thank you :)
Well what Iam trying to generate is that kind of result:
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']
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']
The thing is, the first list will be generated automatically. (so there will
be unknow versions of ELM00x....)
that why Im trying to figure out how to genere variable and list in an
Can you tell me if its not clear please ? :P
my english still need improvement when Im trying to explain scripting
2010/9/1 Xavier Ho <contact at xavierho.com>
> On 2 September 2010 01:11, Alban Nona <python.koda at gmail.com> wrote:
>> seems to have the same error with python.
>> In fact I was coding within nuke, a 2d compositing software (not the best)
>> unfortunately, I dont see how I can use dictionnary to do what I would
>> like to do.
> Hello Alban,
> The reason it's printing only the ELM004 elements is because the variable,
> first, is 'ELM004' when your code goes to line 29.
> I noticed you're using variables created from the for loop out of its block
> as well. Personally I wouldn't recommend it as good practice. There are ways
> around it.
> Could you explain briefly what you want to achieve with this program?
> What's the desired sample output?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list