We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Group(), Groups() & Groupdict()
Group(), Groups() & Groupdict()
Sort by
recency
|
264 Discussions
|
Please Login in order to post a comment
word = input() for i in word: if i.isalnum(): y = i+i if y in word: print(i) break else: print(-1)
import re
S = input()
m = re.search(r'([a-zA-Z0-9])\1+', S)
if m: print(m.group(1)) else: print(-1)