slice solution in Clear category for Swap Nodes by yoichi
def swap_nodes(a): b = [] while a: b.extend(a[1::-1]) a = a[2:] return b
Jan. 27, 2019