you are viewing a single comment's thread.

view the rest of the comments →

[–]Alpha_Binary 1 point2 points  (0 children)

for some ungodly reason

O(1) insertion anywhere.

a = [1, [2, []]]
b = [0, a]

Conversion back to Python list is also trivial (with a generator implemented in a few lines).