5 lines
123 B
Python
5 lines
123 B
Python
def insert(anchor, new):
|
|
new.next = anchor.next
|
|
new.prev = anchor
|
|
anchor.next.prev = new
|
|
anchor.next = new
|