rafi wrote:
> Adriaan Renting wrote:
>> You might be able to do something along the lines of
>> 
>> for count in range(0,maxcount):
>>   value = values[count]
>>   exec(eval("'a%s=%s' % (count, value)"))
> 
> why using the eval?
> 
> exec ('a%s=%s' % (count, value))
> 
> should be fine

And this demonstrates why exec as a statement was a mistake ;)

It actually is

exec 'a%s=%s' % (count, value)

Reinhold
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to