Palindrome using Python

 Please Write the Other types of Palindrome Programming Concept in Python


#1 Palindrome String using Python

s=input('Enter any string ')

rev=s[::-1]

if rev == s :

    print("palindrome")

else:

    print("not palindrome")


#2 Palindrome String using Python

def is_palindrome(string):

    return string==string[::-1]


s=input('Enter any string')

print(is_palindrome(s))

Comments

Popular posts from this blog

Computer Memory, Bus and Printer

Computer Science Syllabus(WBCHSE)