I would like to write a function test(data) to test whether the list has two or more elements refer to the same underlying object
[code=python]
>>>a = range(2)
>>>b = range(4)
>>>c = range(2)
>>>test([a,b,c])
False
>>>test([a,b,c,b]) #b appears 2 times
True
[/code]
If it is a list of numbers or a list of strings like
[1,2,3,4]
['A','B']
I can write it but if it is a list contains many other lists I can't
[code=python]
>>>a = range(2)
>>>b = range(4)
>>>c = range(2)
>>>test([a,b,c])
False
>>>test([a,b,c,b]) #b appears 2 times
True
[/code]
If it is a list of numbers or a list of strings like
[1,2,3,4]
['A','B']
I can write it but if it is a list contains many other lists I can't
Comment