Hi all
So the only way i can think of to swap two elements in list with the following
Many thanks
So the only way i can think of to swap two elements in list with the following
def swap(arr, pos1, pos2):I wonder if there is away where I dont have to send the position of elements to be swapped. Instead by sending references to those elements in list. Like what we do in c or c++. I cant get my head around how the references work in this case in python.
Many thanks