Please what's the "Id" do, or mean | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
+ 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