Skip to content

Commit 8e858f6

Browse files
committed
Regex and Parsing 5 Correction
1 parent 6122093 commit 8e858f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Regex and Parsing/Re.start() & Re.end().py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
import re
55
s, a = [input() for i in '12']
6-
[print('(%s, %s)' % (m.start(), m.end())) for m in re.finditer(a[:1] + '(?=' + a[1:] + ')', s)] or print('(-1, -1)')
6+
[print('(%s, %s)' % (m.start(), m.end())) for m in re.finditer(a[:-1] + '(?=' + a[-1] + ')', s)] or print('(-1, -1)')

0 commit comments

Comments
 (0)