Is there any way to compare lists that reference themselves in Python? You can see what I've tried below:
In[65]: b
Out[65]: [[...]]
In[66]: a
Out[66]: [[[[...]]]]
In[67]: a==b
Traceback (most recent call last):
File "<ipython-input-67-67c639108cf0>", line 1, in <module>
a==b
RecursionError: maximum recursion depth exceeded in comparison
I can understand that it cannot keep going into the list forever, but is there still a way to compare lists that have Ellipsis?
[EDIT]:
How a was created:
a=[]
a.append(a)
a=[[[a]]]
How b was created:
b=[]
b.append(b)
b=[b]