Computer Science, asked by ananyadhadwal6988, 3 months ago

write a program to get a string in uppercase from user and show only the palindrome words from the string​

Answers

Answered by valeriy69
1

\small\mathsf\color{pink}{Solution\: using\: python\: 3}

s = input("enter string: ").split()

palindromes = [word for word in s if word == word[::-1]]

print("\n".join(palindromes))

\small\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by Anonymous
1

\huge \sf {\purple{\underline {\pink {\underline { Answer᭄\ }}}}}

s = input("enter string: ").split()

palindromes = [word for word in s if word == word[::-1]]

print("\n".join(palindromes))

{\huge{\underline{\small{\mathbb{\red{HOPE\:IT\:HELPS\:UH :)}}}}}}

Similar questions