We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6122093 commit 8e858f6Copy full SHA for 8e858f6
Regex and Parsing/Re.start() & Re.end().py
@@ -3,4 +3,4 @@
3
4
import re
5
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)')
+[print('(%s, %s)' % (m.start(), m.end())) for m in re.finditer(a[:-1] + '(?=' + a[-1] + ')', s)] or print('(-1, -1)')
0 commit comments