python get unique id for object

Solutions on MaxInterview for python get unique id for object by the best coders in the world

showing results for - "python get unique id for object"
Darcey
22 Jan 2018
1# Get an Id for object:
2print(id(2))
3140711177190496
4
5print(id("Hi"))
62568748444272
7
8#Why is it so important? If you want to decode something, 
9#you can encode it easily by checking with the if statement