arr = ['a', 'b', 'c', 'd', 'e']
arr[0], arr[2] = arr[2], arr[0]
print(arr)
# -> ['c', 'b', 'a', 'd', 'e']
참고
- https://growingarchive.tistory.com/146
arr = ['a', 'b', 'c', 'd', 'e']
arr[0], arr[2] = arr[2], arr[0]
print(arr)
# -> ['c', 'b', 'a', 'd', 'e']