Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
swap_nodes solution in Clear category for Swap Nodes by gear
def swap_nodes(original):
swapped = original.copy()
i = 0
while i < len(swapped):
if i % 2 == 1:
swapped[i],swapped[i-1] = swapped[i-1],swapped[i]
i += 1
return swapped
Jan. 26, 2019
Comments: