class testClass(object): def __init__(self, val) self.val=val def function(): variable = "name" x="value" exec(str(variable) + "=testClass(