Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Swap Nodes by thealfest1
def swap_nodes(a):
l = list(a)
for n in range(0, len(l) - 1, 2):
l[n], l[n + 1] = l[n + 1], l[n]
return l
Feb. 3, 2019