Compare if two variables reference the same object in python

后端 未结 6 1180
别跟我提以往
别跟我提以往 2021-01-30 06:29

How to check whether two variables reference the same object?

x = [\'a\', \'b\', \'c\']
y = x                 # x and y reference the same object
z = [\'a\', \'b         


        
6条回答
提交回复
热议问题