I would have thought this is the same thing but it’s not
This is not working
cur, cur.next, prev = cur.next, prev, cur
This is working
cur.next, cur, prev = prev, cur.next, cur
on several lines:
tmp = cur.next
cur.next = prev
prev = cur
cur = tmp
I am trying to understand the internal mechanism of python
1