On Fri, Dec 18, 2009 at 3:46 PM, Rami Chowdhury <rami.chowdh...@gmail.com>wrote:

> On Fri, Dec 18, 2009 at 10:55, Victor Subervi <victorsube...@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?
>

:-} I discovered after I wrote this that all I had to do was use the length
of ourOptions. But it's an interesting academic question for future
reference ;/
V
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to