Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1.  
  2. def ispalin(s):
  3. i,j=0,len(s)-1
  4. while i<j:
  5. if s[i] is not letter:
  6. i+=1
  7. continue
  8.  
  9. if s[j] is not letter:
  10. j-=1
  11. continue
  12.  
  13. if s[i]!=s[j]:
  14. return False
  15. i+=1
  16. j-=1
  17.  
  18. return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement