[Tutor] Swapping variables ...

Aditya Lal aditya.n.lal at gmail.com
Fri Nov 9 19:24:14 CET 2007


 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

--
Aditya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20071109/2ebdeb42/attachment.htm 


More information about the Tutor mailing list