swap function?

Bob van der Poel bvdpoel at uniserve.com
Wed Nov 15 20:29:28 EST 2000


Andy Smith wrote:
> 
> Bob van der Poel <bvdpoel at uniserve.com> writes:
> 
> > I'm sure I'm just being very dumb today...but I was looking for a swap
> > function and can't seem to find anything. I really don't need to do:
> >
> >       temp=a
> >       b=a
> >       a=temp
> >
> > everytime I need this do I????
> 
> Try a,b = b,a.
> 
>     Andy
> --
> Andy Smith                                             ams70 at cam.ac.uk
> St John's College, Cambridge, CB2 1TP, UK               (07989) 453208

Thanks! I feel much dumber now....

-- 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: bvdpoel at uniserve.com
WWW:   http://users.uniserve.com/~bvdpoel



More information about the Python-list mailing list