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 234 views
1 answer 291 views
1 answer 276 views
2 answers 332 views
4 answers 419 views
2 answers 378 views
...