Python HackerRank 문제 63 - Re.start() & Re.end()


Python HackerRank 문제 63 - Re.start() & Re.end()

Python HackerRank 문제 63 - Re.start() & Re.end() Re.start() & Re.end() 풀이 import re s = input() k = input() pattern = re.compile(k) r = pattern.search(s) if not r: print("(-1, -1)") while r: print("({0}, {1})".format(r.start(), r.end() - 1)) r = pattern.search(s,r.start() + 1) * 출처 Re.start() & Re.end() | HackerRank Find the indices of the start and end of the substring matched by the group. www.hackerrank.com...


#HackerRank_Restart_Reend #Python #Python_HackerRank #Python_HackerRank_Restart_Reend #Python_Restart_Reend

원문링크 : Python HackerRank 문제 63 - Re.start() & Re.end()