Computer Science, asked by AnnieStar, 1 year ago

Write a program in python to check whether given string is palindrome or not​

Answers

Answered by razaqurban222
0

Answer:

python made a therom

Explanation:

the theorem is called Pythagoras theorem

Answered by Anonymous
1

Answer:

Given a string, write a python function to check if it is palindrome or not. A string is said to be palindrome if reverse of the string is same as string. For example, “radar” is palindrome, but “radix” is not palindrome.

Explanation:

# function which return reverse of a string

def reverse(s):

return s[::-1]

def isPalindrome(s):

# Calling reverse function

rev = reverse(s)

# Checking if both string are equal or not

if (s == rev):

return True

return False

# Driver code

s = "malayalam"

ans = isPalindrome(s)

if ans == 1:

print("Yes")

else:

print("No")

output yes

Similar questions