You are viewing a single comment's thread. Return to all comments →
def superReducedString(s): out = '' for value in s: if '' == out or value != out[-1]: out += value else: out = out[:-1] return out if '' != out else 'Empty String'
Seems like cookies are disabled on this browser, please enable them to open this website
Super Reduced String
You are viewing a single comment's thread. Return to all comments →