扁頭舅父仔嘅網誌
a = [1,2,3] # 'a' points to the list [1,2,3]
b = a # 'b' now points to the same list as 'a'
a = [4,5,6] # 'a' is reassigned to a new list [4,5,6]
Importantly, this does not change b; b still points to the original [1,2,3].
b
[1,2,3]
Microsoft Copilot
沒有留言:
發佈留言