a_list = ["a", "b", "c"]
a_list[0], a_list[2] = a_list[2], a_list[0]
print(a_list) # ["c", "b", "a"]
in python below is how you swap 2 elements of list
x[i+1],x[i]=x[i],x[i+1]
Don't use function swap(user defined or pre-defined)
list1=["Hi how are you"]
list2=["Iam fine"]
list1,list2=list2,list1