I want to free some memory, for example, I define a variable:
b = 10
id(b)
Then I changed the value of b:
b = 11
id(b)
After that, I changed b again:
b = 10
id(b)
Here are the questions, b = 10 the first time, then b = 11 the second time, why is id (b) the third time the same the first time? value 10 is still in memory? How to free memory that takes a value of 10?
source
share