TIL: Python Recursion Limit When Accessing Elements in Recursive List
Earlier today I found this post by Ryan Westlund. It reminded me that in Python you add a reference to a list to itself, like this:
>>> my_list = [1]
>>> my_list.append(my_list)
>>> my_list
[1, [...]]
>>> my_list[1]
[1,[...]]
>>> my_list[1][1][1]
[1,...
fronkan.hashnode.dev2 min read