Fabrizio Milo aka misto wrote: > Hi! > I don't know why you want to do that but actually it is possibble. > > >>>> for i in xrange(10000): >>>> > ... exec( 'var_%s = "var_%s"' %(i,i), locals() ) > > >>>> var_100 >>>> > 'var_100'
It is possible but it's unlikely that it is the best solution to whatever problem the OP is trying to solve. Any reference to the variables created will be similarly roundabout. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor