Swap consecutive elements in a list

后端 未结 0 393
轮回少年
轮回少年 2021-01-22 07:00

How can I swap the elements of my list in such a way that every iteration 2 elements consecutive will be swapped.

Example:

initial_list =          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题