Skip to content

Commit d65f234

Browse files
committed
If you think that by threatening me you can get me to do what you want... Well, that's where you're right. But - and I am only saying that because I care - there's a lot of decaffeinated brands on the market that are just as tasty as the real thing.
1 parent 09dcc2d commit d65f234

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Binary file not shown.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import re
2+
3+
4+
if __name__ == '__main__':
5+
string = input()
6+
substring = input()
7+
8+
matches = re.finditer(fr"(?=({substring}))", string)
9+
is_match = False
10+
11+
for match in matches:
12+
is_match = True
13+
print(f"({match.start(1)}, {match.end(1) - 1})")
14+
15+
if not is_match:
16+
print("(-1, -1)")
17+
18+
19+
20+
21+

0 commit comments

Comments
 (0)