> After quizzing newbies in C on swapping without 3rd variable, I found this > to be really *cool* construct to swap :) > x = 10 > y = 20 > x,y = y,x >
Keep in mind that, this is actually a tuple assignment. A new tuple x,y is created with the older one y,x, and with the side effect thatthe variables are swapped as we see it. yes, tuple concepts does not exist in C (as it is not a Very High Level Language). yes, I too find it "cool" when I got introduced to it. -- O.R.Senthil Kumaran http://uthcode.sarovar.org _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor