Created
December 6, 2019 09:04
-
-
Save rajibmitra/fe23b4a8514c4eb1833453d67f237773 to your computer and use it in GitHub Desktop.
check the palindrom
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
def check_palindrom(word): | |
list_of_words = [] | |
for i in word : | |
list_of_words.append(i) | |
print("list_of_words",list_of_words) | |
list_of_words.reverse() | |
reversed_list_word = list_of_words | |
print ("reverse is ",reversed_list_word) | |
list_of_words.reverse() | |
print ("list of words",list_of_words) | |
if (list_of_words != reversed_list_word) : | |
return False | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment