(1,[1,2],2)中的[1,2]是否以C的形式实现为指针?

时间:2018-10-18 16:13:35

标签: python

参考浅表副本

In [2]: nested_tuple = (1, [1, 2], 2)                                           

In [3]: dup_nested_tuple = tuple(nested_tuple)                                  

In [4]: dup_nested_tuple                                                        
Out[4]: (1, [1, 2], 2)

In [5]: dup_nested_tuple[1][1] = 100                                            

In [6]: nested_tuple                                                            
Out[6]: (1, [1, 100], 2)

用C的细节实现的[1,2]内部列表是否作为指针?

0 个答案:

没有答案