The Python Oracle

If two variables point to the same object, why doesn't reassigning one variable affect the other?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Over a Mysterious Island Looping

--

Chapters
00:00 Question
00:52 Accepted answer (Score 16)
05:03 Answer 2 (Score 3)
06:08 Answer 3 (Score 2)
08:04 Answer 4 (Score 0)
09:14 Thank you

--

Full question
https://stackoverflow.com/questions/5666...

Answer 1 links:
[sys.getrefcount]: https://docs.python.org/3/library/sys.ht...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #variables #reference #variableassignment

#avk47