Is it possible to get the Physical memory address of a variable in python?

Terry Reedy tjreedy at
Mon Jan 23 13:59:52 EST 2017

On 1/23/2017 12:49 PM, Sourabh Kalal wrote:
> how we can access the value from using id..
> like x=10
> id(x)
> 3235346364
> how i can read value 10 using id 3235346364

*In Python*, you cannot.  Ids are mainly for internal use of 
implementations.  Implementors also use them to test their implementation.

*CPython* comes with a module (ctypes) that can be used to muck around 
with interpreter internals, but it is definitely not for beginners.  I 
don't know about other implementations.

Terry Jan Reedy

More information about the Python-list mailing list