exec('var%d=%d'%(1,1)) print(var1)
locals()['var2'] = 2 print(var2)
class varclass: def __init__(self): self.__dict__['var3'] = 3 print(self.var3) varclass()