Computer Science, asked by Sahad1055, 10 months ago

Write a program to overload the following methods. Create an object of the class and call from main method palindrome(int no)->returns true if no is palindrome else false palindrome(String word)-> returns true if word is palindrome else false

Answers

Answered by Anonymous
0

Answer:

# function which return reverse of a string

def isPalindrome(s):

return s == s[::-1]

# Driver code

s = "malayalam"

ans = isPalindrome(s)

if ans:

print("Yes")

else:

print("No")

Similar questions