Skip to content

Instantly share code, notes, and snippets.

@TanjimReza
Created June 18, 2021 14:23
Show Gist options
  • Save TanjimReza/6f4046e399df42732a0d03c5b204fdd3 to your computer and use it in GitHub Desktop.
Save TanjimReza/6f4046e399df42732a0d03c5b204fdd3 to your computer and use it in GitHub Desktop.
name = input("Enter word: ")
length_of_name = len(name)
reversed_name = ""
for i in range(length_of_name-1, -1, -1):
reversed_name = reversed_name + name[i]
if reversed_name == name:
print("The word is palindrome!")
else:
print("The word is not palindrome.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment