Python_program 1

 Practical Name: Write a Python script to check weather an input number is Palindrome or not.

Student Name:  Bhange Vaishnavi Babasaheb

 ______________________________________________________________                                                                                                                            

 Program :-

def isPalindrome(s): 

rev = ''.join(reversed(s))

if (s == rev):

return True

return False

s = (input("Enter String:"))

stri= isPalindrome(s)

if (stri):

print("String is Pallindrome!")

else:

print("String is not Pallindrome!")

!")

Output:




Post a Comment

Previous Post Next Post