0

Please what's the "Id" do, or mean

For example... print(id(2))

15th Feb 2021, 4:59 PM
Derick Jean Cedric
Derick Jean Cedric - avatar
2 Réponses
+ 6
The id() function returns a unique id for the specified object. All objects in Python has its own unique id.
15th Feb 2021, 5:03 PM
你知道規則,我也是
你知道規則,我也是 - avatar
0
Ohh I see, so it means even strings have a special ID... Thanks for the enlightenment
15th Feb 2021, 7:51 PM
Derick Jean Cedric
Derick Jean Cedric - avatar