You are viewing a single comment's thread. Return to all comments →
import sys, re S = sys.stdin.read() S = re.sub(r"[\W|_]*", '', S) match = re.search(r"(\w)\1{1,}", S) if match: print(match.group()[0]) else: print('-1')
Seems like cookies are disabled on this browser, please enable them to open this website
Group(), Groups() & Groupdict()
You are viewing a single comment's thread. Return to all comments →