(The idea is simple but I don't know if it is possible or how to do it in Python) Like:
x = 5
y = id(x)
print(#value_at_y)
print should return 5
, which is the value at address y i.e. id(x)
(The idea is simple but I don't know if it is possible or how to do it in Python) Like:
x = 5
y = id(x)
print(#value_at_y)
print should return 5
, which is the value at address y i.e. id(x)
You must use a dictionary. See below:
y={}
for each x add x and its id(x) to y, like below:
y[x]=id(x)
And you can call them later with
y[x]