Will variable "a" be garbage collected by python garbage collector?
a = [1,2,3]b = [a,a]a.append(b)
If yes, then what happens if we change value of a dynamically? And how does "b" works if the a has been garbage collected? As per my understanding, the reference to a is lost. Does "b" keeps a new copy itself while the initialisation?
I am trying to understand the garbage collection mechanism in python.I read in a blog post that in above code, "a" will get collected by the garbage collector as it is a cycle detection case.