Lee writes:
> I'm creating variables in python but I am having trouble creating them
> when they're *named* using other variables. Here's an example;
>
> while (p!=0):
> p+`p`= string.replace(component[control], ",", "")
> # e.g. I want 'p1 = string.replace.blah...'
>
Hi Lee,
You could use a dictionary for this:
vars = {}
while (p!=0):
vars['p'+`p`] = string.replace(component[control], ",", "")
p=p-1
control=control+1
then 'vars' will contain keys (e.g., 'p1', 'p2' etc.. ) and corresponding values.
If that's totally not what yo
Hi there,
I'm creating variables in python but I am having trouble creating them
when they're *named* using other variables. Here's an example;
while (p!=0):
p+`p`= string.replace(component[control], ",", "")
# e.g. I want 'p1 = string.replace.blah...'
p=p-1
cont