python查看变量在内存中的地址

在python中可以用id()函数获取对象的内存地址。

用法:

var1 = 1
print(id(c=var1))

var1是变量名

原文地址:https://www.cnblogs.com/pengpengboshi/p/13234420.html