Element swapping in list using one line multiple assignment

后端 未结 0 1633
[愿得一人]
[愿得一人] 2021-01-17 10:54

I am trying to swap 2 elements in a list. I want to swap the element at index 0 to the element at index arr[0], so basically I want to swap arr[0] <-> arr[arr[0]].

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