import gc
 
class Foo(object):
    x = []
 
Foo().x
gc.get_referents(Foo.__dict__)[0]['x'] = []
 
print(Foo().x)