toggleCASE by recursive

while 1:
 o="";m=0
 for c in raw_input():o+=chr(ord(c)^m*32);m^=c<'a'
 print o

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top