def reverseList(self, head):
    curr = head
    prev = None
    while (curr != None):
        next = curr.next
        curr.next = prev
        prev = curr
        curr = next
    return prev
def reverseList(self, head):
    curr = head
    prev = None
    while (curr != None):
        next = curr.next
        curr.next = prev
        prev = curr
        curr = next
    return prev