I wonder it it is possiblibe to write function to swap two variables like in C
void swap (int* x, int*y)
{
int temp;
temp = *x;
*x=*y;
*y = temp;
}
I already tried with soemthing like this:
def swap (x, y):
tmp = x
x = y
y = tmp
but it's not it....
Any thoughts?