Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Swap Nodes by Tinus_Trotyl
def swap_nodes(data):
output = []
for i in range(0, len(data), 2):
a, *data = data
if data:
b, *data = data
output.append(b)
output.append(a)
return output
March 30, 2019
Comments: