In the first example, you have three pointers pointing to a memory location for an integer. Then you direct one of the pointers, X, to a different memory location. The other two pointers continue to point to the original integer. In the second example, you have three pointers pointing to a list. The list is mutable. Then you change one of the items in the list. The three-pointers are still pointing to the same list and checking the value of any of them will return the same answer.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…