On line 31 , we code this swap using the Python shorthand:
curr_1.next, curr_2.next = curr_2.next, curr_1.next
If I were split the code into:
curr_1.next = curr_2.next
curr_2.next = curr_1.next
those don’t seem to work. I kinda understand this might create a circular reference, but how does the original line (curr_1.next, curr_2.next = curr_2.next, curr_1.next) work?