Created
July 11, 2023 15:44
-
-
Save DevloperHS/3b19f72ea74f0a6b6353635d4acf18ee to your computer and use it in GitHub Desktop.
Python Program To Check If Given String Is A Palindrome Or Not.
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
# 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