>< swap operator
skybuck2000 at hotmail.com
skybuck2000 at hotmail.com
Tue Aug 14 09:18:41 EDT 2018
On Monday, August 13, 2018 at 10:01:37 PM UTC+2, Léo El Amri wrote:
> On 13/08/2018 21:54, skybuck2000 at hotmail.com wrote:
> > I just had a funny idea how to implement a swap operator for types:
> >
> > A >< B
> >
> > would mean swap A and B.
>
> I think that:
>
> a, b = b, a
>
> is pretty enough
LOL.
A >< B is shorter !
And PPPython is all about writing short and lazy code ! =D
(>< reminds me of XOR swap ;))
Bye,
Skybuck ;)
More information about the Python-list
mailing list