You are viewing a single comment's thread. Return to all comments →
Simple Python/Regex solution:
import re s, regex = raw_input().strip(), re.compile(r'(\w)(\1)') match = regex.search(s) while match: s = s.replace(match.group(),'') match = regex.search(s) print s if s 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 →
Simple Python/Regex solution: