Guest User

Untitled

a guest
May 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. import location
  2. import os
  3.  
  4. # function which return reverse of a string
  5. def reverse(s):
  6. return s[::-1]
  7.  
  8. def isPalindrome(theString):
  9.  
  10. flip = reverse(theString)
  11.  
  12. if flip == theString:
  13. print("True")
  14. else:
  15. print("False")
  16.  
  17.  
  18. isPalindrome("nitin")
Add Comment
Please, Sign In to add comment