How to check whether a string is palindrome or not in Python

1 Answer

0 votes
s = "rotator"

if s == s[::-1]:
    print("Palindrome")
else:
    print("Not Palindrome")
    
   
    
'''
run:

Palindrome

'''

 



answered Aug 23, 2021 by avibootz

Related questions

1 answer 138 views
1 answer 173 views
1 answer 161 views
2 answers 191 views
4 answers 228 views
2 answers 248 views
...