Infosys interview question

Write program to check for palindrome

Interview Answer

Anonymous

Sep 3, 2023

s = 'abcba' if s == s[::-1]: print("Palindrome")