How Do I...?

Rami Chowdhury rami.chowdhury at gmail.com
Fri Dec 18 14:46:47 EST 2009


On Fri, Dec 18, 2009 at 10:55, Victor Subervi <victorsubervi at gmail.com> wrote:
> Hi;
> I have this code:
>
>     i = 0
>     nameNos = []
>     nos = []
>     for option in ourOptions():
>       nameNos.append('optionNo%d' % i)
>       nos.append(i)
>       i += 1
>
> The idea is that through every iteration of option, I can create a new
> variable such as 'optionNo0', 'optionNo1' etc and assign values such as '0',
> '1' etc to them.

What are you expecting to do with those variables and values later?



-- 
Rami Chowdhury
"Never assume malice when stupidity will suffice." -- Hanlon's Razor
408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)



More information about the Python-list mailing list