```
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def oddEvenList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if not head:
return head
odd=head
even=head.next
while even and even.next!=None:
temp = even.next
even.next = even.next.next
temp.next = odd.next
odd.next = temp
odd=odd.next
even=even.next
return head
```

read in two node at a time:

first node(odd) goes into odd.next

2nd node(even).next = next even node (node.next.next)

rinse and repeat

so basically

1 - 2 - 3 - 4- 5- 6 -7-null

odd = 1 even = 2

temp = 3

even(2).next = even.next.next(4)

temp(3).next=odd(1).next(2)

(this makes sure the end of odd always points to start of even)

odd(1).next = temp(3)

odd = odd.next(3) move the pointer

even = even.next(4) move the pointer

1-3(odd)-2-4(even)-5-null

1-3-5(odd)-2-4-null(even)

1-3-5-7(odd)-2-4-6-null(even)