Python Forum
How to determine how many variables are referring the same id in python?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to determine how many variables are referring the same id in python?
#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
Reply


Messages In This Thread
How to determine how many variables are referring the same id in python? - by divyansh - Aug-04-2020, 10:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Determine number of all the immediately adjacent points in python zackk 1 1,856 Feb-06-2021, 09:23 AM
Last Post: zackk
  How to determine pen color from an image? robie972003 2 2,374 Mar-24-2019, 10:06 PM
Last Post: robie972003
  determine if an number is in a list Dbeah 7 3,760 Nov-06-2018, 12:11 PM
Last Post: buran
  determine if an number is in a list Dbeah 1 2,226 Nov-04-2018, 04:50 PM
Last Post: stullis
  how to determine if an object is a number Skaperen 6 3,948 Jul-11-2018, 08:18 PM
Last Post: Skaperen
  How Do I Determine indentation in AST? jimo 3 4,218 Jul-01-2018, 04:25 PM
Last Post: buran
  Determine whether a method was overridden porton 6 6,104 Nov-14-2016, 09:51 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020