标签:ddr 结果 修改 ESS col 引用 span 变量 add
a=1 print("a address is ",id(a)) b=a c=b print("b address is ",id(b)) print("c address is ",id(c)) 打印结果: a address is 140706134913296 #b c a 都指向 1 所在的内存空间 b address is 140706134913296 c address is 140706134913296 b=2 print("b address is ",id(b)) print("c address is ",id(c)) 打印结果: b address is 140706134913328 #b 指向2所在的内存空间 c address is 140706134913296 #修改b后,c 仍然指向 1 所在的内存空间 a=3 print("c address is ",id(c)) print("c=%d"%c) 打印结果: c address is 140706134913296 #修改a的值,c仍然指向1 所在内存空间 c=1 # c 值仍然是1
标签:ddr 结果 修改 ESS col 引用 span 变量 add
原文地址:https://www.cnblogs.com/abel2020/p/13081400.html