def swap(A, i, j):
    A[i], A[j] = A[j], A[i]

A = [6, 3, 2, 5, 7, 1, 4]
swap(A, 0, 1)
print(A)
swap(A, 2, 5)
print(A)
