Two pointers pointing to the current odd and even nodes. At the end, link the last odd node to the head of even nodes. Boom! Done.
def oddEvenList(self): if head and head.next: curOdd = head headEven, curEven = head.next, head.next while curOdd and curEven and curOdd.next and curEven.next: curOdd.next = curEven.next curOdd = curOdd.next curEven.next = curOdd.next curEven = curEven.next curOdd.next = headEven return head