I was trying to demonstrate call by reference and value and what the address of the variable is in python:
x = 10
print x
10
x = id(x)
print x
3457569
I pass x to my function by reference as x is an address
def foo(d):
print "the value of d is" ,**inverseid(d)**
foo(x)
3457569
I want the inverse(d) to print 10 but it prints the address!
Is there an inbuilt inverse of id() or can someone show me how to generate the value of an address similar to the * operator in C ?