Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. from re import split, findall
  2.  
  3.  
  4. n, word = input(), input()
  5. reversed_word = word[::-1]
  6.  
  7. if findall(reversed_word, word2) != []:
  8.     print(len(split(reversed_word, word2)[0]))
  9. else:
  10.     print(-1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement