

class Data:
    def __init__(self):
        self.data = 0 

class Test:
    def __init__(self):
        self.test = Data()

    def run(self):
        self.test = Data()
        self.test.data = 1
        check = self.test
        print (id(self.test))
        print (type(self.test))

        self.test = Data()
        self.test.data = 2
        print (id(self.test))
        print (type(self.test))


        print (check)
        print (check.data)
        print (self.test)
        print (self.test.data)

Test().run()



