Python program to check if a given string is palindrome or not
#Python program to check if a string is palindrome or not
#Given a string, write a python function to check if it is palindrome or not.
#A string is said to be palindrome if the reverse of the string is the same as string.
#For example, “radar” is a palindrome, but “radix” is not a palindrome.
#Examples:
#Input : malayalam
#Output : Yes
#Input : tea
#Output : No
def isPalindrome(word):
return word == word[::-1]
Driver code
word = "malayala"
ans = isPalindrome(word)
if ans:
print("Yes")
else:
print("No")
Nesta página do site você pode assistir ao vídeo on-line PYTHON -Program to check if a string is palindrome duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Technical RPA 17 Agosto 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 304 vezes e gostou 5 espectadores. Boa visualização!