Created
May 12, 2017 10:57
-
-
Save odanga94/4c3012cecf702ee8f328ecb6ecb9ce0b to your computer and use it in GitHub Desktop.
PracticePython/Exercise6
This file contains hidden or 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
string = raw_input("Enter the string to test:") | |
string = string.lower() | |
backwards = [] | |
index = len(string) - 1 | |
while index >= 0: | |
backwards.append(string[index]) | |
index -= 1 | |
string_backwards = "".join(backwards) | |
if string == string_backwards: | |
print(True) | |
else: | |
print(False) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment