1

consider the python code below

divyansh = 22
jhon = 22
# below are id's
id(divyansh)
id(jhon)
id(22)
# all of the above ids will be same 

now i wish to find the names of the variables referring this particular id. |OR| The number of the variables reffing this particular id.

is there any way of doing this in python

Divyansh
  • 71
  • 2
  • 6
  • 2
    This question could be useful: https://stackoverflow.com/questions/510406/is-there-a-way-to-get-the-current-ref-count-of-an-object-in-python – Riccardo Bucco Aug 04 '20 at 10:40

0 Answers0