current position:Home>The problem of is and memory address in Python

The problem of is and memory address in Python

2022-02-02 20:25:17 CSDN Q & A

img


Why do tuples and integers exist id Different ?
Integer count two different objects , The address is the same ,
Tuples are two different objects , The address is different ?




Refer to the answer 1:

Take a look at the concept of small data pool , such as :
https://www.cnblogs.com/jin-xin/articles/9439483.html




Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202022025150524.html

Random recommended