内存地址 id

def a():
return b

def b():
print('666')
c = a()
print(c) #打印16进制的内存地址
print(b) #打印16进制的内存地址
print (id(c)) #打印10进制的内存地址

运行结果:

<function b at 0x0000000001E84BF8>
<function b at 0x0000000001E84BF8>
32001016

把print(c)得到的结果转换成10进制,就和print(id(c))的结果一样了;

 


原文地址:https://www.cnblogs.com/lighthouse/p/9543584.html