[Tutor] toggle idiom?

Andrei Kulakov ak@silmarill.org
Tue, 7 May 2002 17:00:57 -0400


Hello,

I'm not sure this is a "toggle idiom", but here's what it should do:

if a:
    a = 0
else:
    a = 1

Is there a one-liner that can do this?

- Andrei

-- 
Cymbaline: intelligent learning mp3 player - python, linux, console.
get it at: cy.silmarill.org