Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from re import split, findall
- n, word = input(), input()
- reversed_word = word[::-1]
- if findall(reversed_word, word2) != []:
- print(len(split(reversed_word, word2)[0]))
- else:
- print(-1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement