import _ctypes

def di(obj_id):
    """ Inverse of id() function. """
return _ctypes.PyObj_FromPtr(obj_id)
if __name__ == '__main__':
    a = 42
b = 'answer'
print(di(id(a)))
print(di(id(b)))
Is it possible to dereference variable id's?