I read this particular thread on Stack Overflow, but I'm still wondering... why doesn't variable swapping work if you put the tuple in a function, like so:
def badswap(x,y):
x,y = y,x
badswap(a,b)
I saw this particular example in How to Think Like a Computer Scientist and have been dwelling over this issue ever since.
Any shedding of light here would be much much appreciated.
-T