Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
a[i:i+2][::-1] solution in Clear category for Swap Nodes by Olpag
swap_nodes = lambda a: [j for i in range(0, len(a), 2) for j in a[i:i+2][::-1]]
Sept. 20, 2019
Comments: