Skip to content

Instantly share code, notes, and snippets.

@lopezm1
Created May 19, 2018 21:49
Show Gist options
  • Save lopezm1/e179cb3f1d5af80ce5fe6e47a10ae284 to your computer and use it in GitHub Desktop.
Save lopezm1/e179cb3f1d5af80ce5fe6e47a10ae284 to your computer and use it in GitHub Desktop.
Palindrome?
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