Swap Nodes Swap Nodes
Elementary
RU English
The mission is in Blocked Mode. Access to the solutions is blocked for a day or two (even after you share your own), until we'll have enough solutions for you to check. All users who've solved the mission will get the notifications about their opening.

Your task is to swap elements of the list (Iterable) pairwise. If you are given a list of 4 elements, then your function should return...

If there isn’t a paired amount of elements, then leave the last unpaired element in its place. An empty list should remain empty.

Iterable.

Iterable.

swap_nodes([1, 2, 3, 4]) == [2, 1, 4, 3]
swap_nodes([5, 5, 5, 5]) == [5, 5, 5, 5]
You should be an authorized user in order to see the full description and start solving this mission.