You are viewing a single comment's thread. Return to all comments →
#Below Python 3.8 : import re s = input() print(s[re.search(r'([a-zA-Z\d])\1', s).start()]) if re.search(r'([a-zA-Z\d])\1', s) else print("-1") #Since Python 3.8 print(s[match.start()]) if (match := re.search(r'([a-zA-Z\d])\1', s)) 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 →