Skip to content

Instantly share code, notes, and snippets.

@DevloperHS
Created July 11, 2023 15:44
Show Gist options
  • Save DevloperHS/3b19f72ea74f0a6b6353635d4acf18ee to your computer and use it in GitHub Desktop.
Save DevloperHS/3b19f72ea74f0a6b6353635d4acf18ee to your computer and use it in GitHub Desktop.
Python Program To Check If Given String Is A Palindrome Or Not.
# write a palindrome program in python
# string jise left-> right , right-> left read kro , dono same honge : dad , mom
# user input()
s = input()
# string reverse
rev_s = s[::-1]
# condition if normal string == reverse string then true Else false.
if s==rev_s:
print("True")
else:
print("False")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment