Created
May 19, 2018 21:49
-
-
Save lopezm1/e179cb3f1d5af80ce5fe6e47a10ae284 to your computer and use it in GitHub Desktop.
Palindrome?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import location | |
import os | |
# function which return reverse of a string | |
def reverse(s): | |
return s[::-1] | |
def isPalindrome(theString): | |
flip = reverse(theString) | |
if flip == theString: | |
print("True") | |
else: | |
print("False") | |
isPalindrome("nitin") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment