📜  python获取对象的唯一ID - Python代码示例

📅  最后修改于: 2022-03-11 14:46:27.247000             🧑  作者: Mango

代码示例1
# Get an Id for object:
print(id(2))
140711177190496

print(id("Hi"))
2568748444272

#Why is it so important? If you want to decode something, 
#you can encode it easily by checking with the if statement