sWAP cASE

  • + 4 comments

    I failed at a list comprehension solution and had to resort to the humble 'for' loop. Somehow it didn't occur to me that I could use an "else" like that in a list comprehension. Thanks for posting your answer!

    (also, the fact that you just go straight to iterating over "raw_input", that's a neat thing)