pgbovine/OnlinePythonTutor — Issue #1: Generator expressions not supported
Author: encukou
Created: 2012-01-31 12:10:38+00:00
State: open

I wrote the following code for the “Remove duplicate characters” task:

def removeDups(s):
seen = set()
return ''.join(c for c in s
if c not in seen and not seen.add(c))

When stepping throught it, I got an alert box saying `Error: ASSERTION FAILED`.