<garvit244>24_1.py
def swapPairs( head):
    if head is None:
        return head
    
    ref = head
    
    while ref is not None and ref.next is not None:
        ref.val, ref.next.val = ref.next.val, ref.val
        ref = ref.next.next
        
    return head
def sample_funcname ( var_0 ) :
    if var_0 is None :
        return var_0
    var_2 = var_0
    while var_2 is not None and var_2.next is not None :
        var_2.val , var_2.next.val = var_2.next.val , var_2.val
        var_2 = var_2.next.next
    return var_0
