HackerRank Re.start() & Re.end() solution in python
In this Re.start() & Re.end() problem, You are given a string S. Your task is to find the indices of the start and end of string K in S. Problem solution in Python 2 programming. import re S = raw_input() k = raw_input() anymatch = ‘No’ for m in re.finditer(r'(?=(‘+k+’))’,S): anymatch = ‘Yes’ print (m.start(1),m.end(1)-1) if…
Learn More “HackerRank Re.start() & Re.end() solution in python” »